Retrieves a single work item based off of the supplied ID

        :param wi_id: The work item ID number
        :return: Workitem or None
501272
def get_work_item_by_id(self, wi_id):
        '''
        
        '''
        work_items = self.get_work_items(id=wi_id)
        if work_items is not None:
            return work_items[0]
        return None
1016020
public Optional<OPFItem> getItemById(String id)
  {
    return Optional.fromNullable(itemsById.get(id));
  }
1230890
def get_task(self, task_id):
        
        task = self.request_single('GetTask', {'id': task_id})

        if task:
            return zobjects.Task.from_dict(task)
        else:
            return None
1359993
def get_link(self, task_id):
        
        links = [x for x in self.links if x.task_id == task_id]
        if len(links) != 1:
            raise CoTError("No single Link matches task_id {}!\n{}".format(task_id, self.dependent_task_ids()))
        return links[0]
933907
def get(self, id):
        
        for obj in self.model.db:
            if obj["id"] == id:
                return self._cast_model(obj)

        return None
758138
public function getWorkflow($id)
	{
		if ( ! array_key_exists($id, $this->_w) ) {

			$workflow = null;
			$def =  $this->getWorkflowDefinition($id);

			if ( $def != null ) {
				unset($def[self::KEY_NODES]);
				$def['id'] = $id;
				if ( isset($def[Workflow::PARAM_INITIAL_STATUS_ID])) {
					$ids = $this->parseStatusId($def[Workflow::PARAM_INITIAL_STATUS_ID], $id);
					$def[Workflow::PARAM_INITIAL_STATUS_ID] = implode(self::SEPARATOR_STATUS_NAME, $ids);
				} else {
					throw new WorkflowException('failed to load Workflow '.$id.' : missing initial status id');
				}
				$def['class'] = $this->getClassMapByType(self::TYPE_WORKFLOW);
				$def['source'] = $this;

				$workflow = Yii::createObject($def);
			}
			$this->_w[$id] = $workflow;
		}
		return $this->_w[$id];
	}
896701
public Task getTask(String id) {
		final int index = ids.indexOf(id);
		if (index > -1) {
			return getTask(index);
		}
		return null;
	}
467376
def check(self, item_id):
        
        response = self._request("tasks/view/{id}".format(id=item_id))

        if response.status_code == 404:
            # probably an unknown task id
            return False

        try:
            content = json.loads(response.content.decode('utf-8'))
            status = content['task']["status"]
            if status == 'completed' or status == "reported":
                return True

        except ValueError as e:
            raise sandboxapi.SandboxError(e)

        return False
782950
def check(self, item_id):
        
        try:
            return self.jbx.info(item_id).get('status').lower() == 'finished'
        except jbxapi.JoeException:
            return False

        return False
428728
def get_fw(self, fw_id):
        
        fw = None
        try:
            fw = self.neutronclient.show_firewall(fw_id)
        except Exception as exc:
            LOG.error("Failed to get firewall list for id %(id)s, "
                      "Exc %(exc)s", {'id': fw_id, 'exc': str(exc)})
        return fw
204257
def get(self, deviceId, measurementId):
        
        record = self.measurements.get(deviceId)
        if record is not None:
            return record.get(measurementId)
        return None
196662
public AbstractJobVertex findVertexByID(final JobVertexID id) {

		if (this.inputVertices.containsKey(id)) {
			return this.inputVertices.get(id);
		}

		if (this.outputVertices.containsKey(id)) {
			return this.outputVertices.get(id);
		}

		if (this.taskVertices.containsKey(id)) {
			return this.taskVertices.get(id);
		}

		return null;
	}
1134614
def get_work_items(self, **filters):
        '''
        
        '''
        filter_string = ""
        for key, val in filters.iteritems():
            filter_string += "%s='%s'" % (key, val)
        url = "/rpt/repository/workitem?fields=workitem/workItem[%s]/(" \
              "*|\
               owner/name|\
               state/name|\
               projectArea/name|\
               type/name|\
               comments/*|\
               comments/creator/*|\
               stringComplexity/*|\
               category/*|\
               creator/*|\
               tags/*|\
               priority/*|\
               severity/*\
               )" % filter_string
        try:
            response = self.get(url)
        except requests.exceptions.ReadTimeout:
            return "Request timed out :("

        if response.status_code != 200:
            return None

        output = xmltodict.parse(response.text)
        if "workItem" not in output["workitem"]:
            return None
        else:
            workitems = []
            if isinstance(output["workitem"]["workItem"], list):
                for wi in output["workitem"]["workItem"]:
                    workitems.append(Workitem(wi))
            else:
                workitems.append(Workitem(output["workitem"]["workItem"]))
            return workitems
646607
def get(self, id):
        
        data = self.fetch('documents/%s.json' % id).get("document")
        data['_connection'] = self._connection
        return Document(data)
1300430
def get(self, id):
        """"""
        params = {'q': 'id:%s' % str(id), 'wt': 'python'}
        request = urllib.parse.urlencode(params, doseq=True)
        data = None
        try:
            rsp = self.doPost(self.solrBase + '', request, self.formheaders)
            data = eval(rsp.read())
        except Exception:
            pass
        if data['response']['numFound'] > 0:
            return data['response']['docs'][0]
        return None
1295148
def delete(self, item_id):
        
        try:
            response = self._request("tasks/delete/{id}".format(id=item_id))

            if response.status_code == 200:
                return True

        except sandboxapi.SandboxError:
            pass

        return False
609628
def get(self, id):
        
        self.cur.execute("SELECT * FROM jobs WHERE hash=?", (id,))
        item = self.cur.fetchone()
        if item:
            return dict(zip(
                ("id", "description", "last-run", "next-run", "last-run-result"),
                item))

        return None