Function enhance
        Enhance the object with new item or enhanced items
555902
def enhance(self):
        
        if self.objName in ['hosts', 'hostgroups',
                            'puppet_classes']:
            from foreman.itemSmartClassParameter\
                import ItemSmartClassParameter
            self.update({'smart_class_parameters':
                        SubDict(self.api, self.objName,
                                self.payloadObj, self.key,
                                ItemSmartClassParameter)})
1294644
def append(self, item):
        
        self._deque.append(item)
        self.notEmpty.set()
1187002
def add_item(self, item):
        """"""

        if not isinstance(item, JsonRpcResponse):
            raise TypeError(
                "Expected JsonRpcResponse but got {} instead".format(type(item).__name__))

        self.items.append(item)
803316
def do_add_item(self, args):
        """"""
        if args.food:
            add_item = args.food
        elif args.sport:
            add_item = args.sport
        elif args.other:
            add_item = args.other
        else:
            add_item = 'no items'

        self.poutput("You added {}".format(add_item))
559094
def enhance2dataset(dset):
    """"""
    attrs = dset.attrs
    img = get_enhanced_image(dset)
    # Clip image data to interval [0.0, 1.0]
    data = img.data.clip(0.0, 1.0)
    data.attrs = attrs

    return data
662769
def create_new_item(*args)
      if block_given?
        new_item = yield(*args)
      else
        new_item = create(*args)
      end

      transform_item(new_item)
    end
1282786
def composite_update(item, update_dict, soft=False):
        
        item = Composite(item)

        for part in item.get_content():
            if soft:
                for key, value in update_dict.items():
                    if key not in part:
                        part[key] = value
            else:
                part.update(update_dict)
        return item
1170498
function enhancedEcommerceProductAction(track, action, data) {
  enhancedEcommerceTrackProduct(track);
  window.ga('ec:setAction', action, data || {});
}
523289
def add(self, item):
        ""
        for pos in self._hashes(item):
            self.hash |= (2 ** pos)
785862
def expand_all(self):
        """"""

        def aux(item):
            self.item(item, open=True)
            children = self.get_children(item)
            for c in children:
                aux(c)

        children = self.get_children("")
        for c in children:
            aux(c)
1358437
def addItem( self, item ):
        
        result = super(XNodeScene, self).addItem(item)
        self.setModified()
        self._cache.add(item)
        
        return result
471852
def expand(obj, relation, seen):
    

    if hasattr(relation, 'all'):
        relation = relation.all()

    if hasattr(relation, '__iter__'):
        return [expand(obj, item, seen) for item in relation]

    if type(relation) not in seen:
        return to_json(relation, seen + [type(obj)])
    else:
        return relation.id
363645
function(oldItem, newItem) {
      if(data.operations) {
        for(var i = 0; i < data.operations.length; i++) {
          var operation = data.operations[i];
          if(newItem && newItem[operation.field] !== undefined || oldItem && oldItem[operation.field] !== undefined) {
            opsToolbox[operation.operation].recompute(operations[operation.field], operation, oldItem, newItem);
          }
        }
      }
    }
1167424
def add_item(self, item):
        """"""
        _idx = len(self.items)
        self.items.update({"item_" + str(_idx + 1): item})
705812
def add(self, attr, item):
        
        return self.set(attr, operation.Add([item]))
1237291
def extend(self, items):
        
        if items:
            if self.serialized:
                items = list(map(self._dumps, items))
            self._client.rpush(self.key_prefix, *items)
400786
def addItem(self, item):
        """"""
        try:
            self.tree.addItem(item)
        except AttributeError, e:
            raise VersionError('Saved versions are immutable')