Returns table_item's (row, column) cordinates.
        Returns None in case of item not found.

        Args:
            table_item (TableItem): an item instance
357232
def item_coords(self, table_item):
        
        for row_key in self.children.keys():
            for item_key in self.children[row_key].children.keys():
                if self.children[row_key].children[item_key] == table_item:
                    return (int(row_key), int(item_key))
        return None
410247
def index(self, row, column, parent=QModelIndex()):
        
        if parent is not None and not parent.isValid():
            parentItem = self.rootItem
        else:
            parentItem = self.item(parent)

        childItem = parentItem.child(row)

        if childItem:
            index = self.createIndex(row, column, childItem)
        else:
            index = QModelIndex()

        return index
992847
def _GetRow(self, columns=None):
        """"""

        row = self._table[self._row_index]
        if columns:
            result = []
            for col in columns:
                if col not in self.header:
                    raise TableError("Column header %s not known in table." % col)
                result.append(row[self.header.index(col)])
            row = result
        return row
757997
def select_item(self, items):
        
        if not items:
            return
        elif not hasattr(items, "__iter__"):
            items = (items,)
        selection_changed = False
        with self._suppress_selection_events():
            for item in items:
                self.queue_draw_item(item)
                if item is not None and item.model not in self._selection:
                    self._selection.add(item.model)
                    selection_changed = True
        if selection_changed:
            self.emit('selection-changed', self._get_selected_items())
409365
public C getCell(T item) {
        C cell = pool.poll();
        if(cell != null) {
            cell.updateItem(item);
        } else {
            cell = cellFactory.apply(item);
        }
        return cell;
    }
331798
def on_table_row_click(self, row, item):
        ''' '''
        if hasattr(self, "last_clicked_row"):
            del self.last_clicked_row.style['outline']
        self.last_clicked_row = row
        self.last_clicked_row.style['outline'] = "2px dotted blue"
        return (row, item)
260954
def find_item(item)
      return nil if cart_items.blank?

      item = prepare_for_cart_item(item)
      result = cart_items.detect do |ci|
        ci.type == item.type && ci.unit == item.unit
      end
      return result.nil? ? false : result
    end
105569
public function getRow($item)
	{
		$row = [];

		foreach ($this->columns as $column) {
			$row[] = strip_tags($column->render($item));
		}

		return $row;
	}
1148027
def get_member(row, key):
    '''  '''
    (target, tkey, tvalue) = dict_crawl(row, key)
    if target:
        return tvalue
    return None
145467
def _findRow(subNo, model):
    """"""
    items = model.findItems(str(subNo))
    if len(items) == 0:
        return None
    if len(items) > 1:
        raise IndexError("Too many items with sub number %s" % subNo)
    return items[0].row()
275050
def create_from_row(cls, table_row):
        
        kwargs = {}
        for key in table_row.colnames:
            kwargs[key] = table_row[key]
        try:
            return cls(**kwargs)
        except KeyError:
            print(kwargs)
1183501
def find(self, item):
		
		for i, seg in enumerate(self):
			if item in seg:
				return i
		raise ValueError(item)
1082869
def getItem(self, itemId):
        
        url = "%s/items/%s" % (self.root, itemId)
        return Item(url=url,
                    securityHandler=self._securityHandler,
                    proxy_url=self._proxy_url,
                    proxy_port=self._proxy_port)
771418
def select_left_item
      return :UNHANDLED if @items.nil? or @items.empty? or @active_index.nil?
      index = nil
      crow = @items[@active_index].row 
      ccol = @items[@active_index].col 
      @items.each_with_index { |e, i| index = i if e.row == crow && e.col < ccol }
      if index
        select_item index
      else
        return :UNHANDLED
      end
    end
48665
def get_iterargs(self, item):
    
    # iterargs should always be mandatory, unless there's a good reason
    # not to, which I can't think of right now.

    args = self._get_aggregate_args(item, 'mandatoryArgs')
    return tuple(sorted([arg for arg in args if arg in self.iterargs]))
396846
def _get_row(self, id):
        """"""
        return {name: d['func'](id) for (name, d) in self._columns.items()}
1319208
def findPreviousItem(self, item):
        
        if not item:
            return None
        
        while item.parent():
            index = item.parent().indexOfChild(item)
            if index == 0:
                return item.parent()
            
            child = item.parent().child(index-1)
            if child:
                while child.childCount():
                    child = child.child(child.childCount() - 1)
                return child
            
            item = item.parent()
        
        index = self.indexOfTopLevelItem(item)
        out = self.topLevelItem(index-1)
        while out and out.childCount():
            out = out.child(out.childCount() - 1)
        return out