wrapped with update, override that in a subclass to customize
505753
def _update(self, **kwargs):
        """"""

        requests_params, update_uri, session, read_only = \
            self._prepare_put_or_patch(kwargs)

        read_only_mutations = []
        for attr in read_only:
            if attr in kwargs:
                read_only_mutations.append(attr)
        if read_only_mutations:
            msg = 'Attempted to mutate read-only attribute(s): %s' \
                  % read_only_mutations
            raise AttemptedMutationOfReadOnly(msg)

        # Get the current state of the object on BIG-IP® and check the
        # generation Use pop here because we don't want force in the data_dict
        force = self._check_force_arg(kwargs.pop('force', True))
        if not force:
            # generation has a known server-side error
            self._check_generation()

        kwargs = self._check_for_boolean_pair_reduction(kwargs)

        # Save the meta data so we can add it back into self after we
        # load the new object.
        temp_meta = self.__dict__.pop('_meta_data')

        # Need to remove any of the Collection objects from self.__dict__
        # because these are subCollections and _meta_data and
        # other non-BIG-IP® attrs are not removed from the subCollections
        # See issue #146 for details
        tmp = dict()
        for key, value in iteritems(self.__dict__):
            # In Python2 versions we were changing a dictionary in place,
            # but this cannot be done with an iterator as an error is raised.
            # So instead we create a temporary holder for the modified dict
            # and then re-assign it afterwards.
            if isinstance(value, Collection):
                pass
            else:
                tmp[key] = value
        self.__dict__ = tmp
        data_dict = self.to_dict()

        # Remove any read-only attributes from our data_dict before we update
        # the data dict with the attributes.  If they pass in read-only attrs
        # in the method call we are going to let BIG-IP® let them know about it
        # when it fails
        for attr in read_only:
            data_dict.pop(attr, '')

        data_dict.update(kwargs)
        data_dict = self._prepare_request_json(data_dict)

        # Handles ConnectionAborted errors
        #
        # @see https://github.com/F5Networks/f5-ansible/issues/317
        # @see https://github.com/requests/requests/issues/2364
        for _ in range(0, 30):
            try:
                response = session.put(update_uri, json=data_dict, **requests_params)
                self._meta_data = temp_meta
                self._local_update(response.json())
                break
            except iControlUnexpectedHTTPError:
                response = session.get(update_uri, **requests_params)
                self._meta_data = temp_meta
                self._local_update(response.json())
                raise
            except ConnectionError as ex:
                if 'Connection aborted' in str(ex):
                    time.sleep(1)
                    continue
                else:
                    raise
181801
def method(self, symbol):
        '''
        
        '''
        assert issubclass(symbol, SymbolBase)
        def wrapped(fn):
            setattr(symbol, fn.__name__, fn)
        return wrapped
111526
def _wrap(cls, func):
        

        if isinstance(func, cls):
            return func
        return functools.update_wrapper(cls(func), func)
694120
def monkey_patch_override_instance_method(instance):
    
    def perform_override(override_fn):
        fn_name = override_fn.__name__
        original_fn_name = '_original_' + fn_name
        # Override instance method, if it hasn't already been done
        if not hasattr(instance, original_fn_name):
            original_fn = getattr(instance, fn_name)
            setattr(instance, original_fn_name, original_fn)
            bound_override_fn = override_fn.__get__(instance)
            setattr(instance, fn_name, bound_override_fn)
    return perform_override
1307451
def return_self_updater(func):
    '''
    
    '''
    @functools.wraps(func)
    def decorator(k,v):
        func(k,v)
        return v
    return decorator
1069479
function updateObjectImpl(obj, update, isSelected) {
  if (isSelected(obj)) {
    return update(obj);
  }
  var result = obj;
  var changed = false;
  _lodash2.default.forOwn(obj, function (val, key) {
    var newval = updateValue(val, update, isSelected);
    if (newval === val) {
      return;
    }
    if (!changed) {
      result = _extends({}, obj);
      changed = true;
    }
    result[key] = newval;
  });
  return result;
}
635465
def WrapImmutable(cls, pyobj, what):
        '''
        '''
        d = cls.types_dict
        if type(pyobj) is bool:  
            pyclass = d[int]
        elif d.has_key(type(pyobj)) is True:
            pyclass = d[type(pyobj)]
        else:
            raise TypeError,\
               'Expecting a built-in type in %s (got %s).' %(
                d.keys(),type(pyobj))

        newobj = pyclass(pyobj)
        newobj.typecode = what
        return newobj
577516
def modify(self, **kwargs):
        """"""
        for key, val in kwargs.items():
            setattr(self, key, val)
        return self
1137144
def mutating_method(func):
    """"""
    def wrapper(self, *__args, **__kwargs):
        old_mutable = self._mutable
        self._mutable = True
        try:
            # Call the wrapped function
            return func(self, *__args, **__kwargs)
        finally:
            self._mutable = old_mutable
    return wrapper
356997
private AdvancedModelWrapper updateEOByUpdatedModel(EDBModelObject reference, AdvancedModelWrapper model,
            Map<Object, AdvancedModelWrapper> updated) {
        ModelDescription source = model.getModelDescription();
        ModelDescription description = reference.getModelDescription();
        AdvancedModelWrapper wrapper = updated.get(reference.getOID());
        Object ref = null;
        if (wrapper == null) {
            ref = reference.getCorrespondingModel();
        } else {
            ref = wrapper.getUnderlyingModel();
        }
        Object transformResult = transformationEngine.performTransformation(source, description,
            model.getUnderlyingModel(), ref);
        return AdvancedModelWrapper.wrap(transformResult);
    }
1308719
def custom_update_user(sender, instance, attributes, user_modified, **kargs):
    
    for k, v in attributes.items():
        u = set.intersection(set(v), set([u'true', u'false']))
        if u:
            setattr(instance, k, u.pop() == u'true')
    return True
1094237
private void wrapSetterMethod(ClassNode classNode, boolean bindable, String propertyName) {
        String getterName = "get" + MetaClassHelper.capitalize(propertyName);
        MethodNode setter = classNode.getSetterMethod("set" + MetaClassHelper.capitalize(propertyName));

        if (setter != null) {
            // Get the existing code block
            Statement code = setter.getCode();

            Expression oldValue = varX("$oldValue");
            Expression newValue = varX("$newValue");
            Expression proposedValue = varX(setter.getParameters()[0].getName());
            BlockStatement block = new BlockStatement();

            // create a local variable to hold the old value from the getter
            block.addStatement(declS(oldValue, callThisX(getterName)));

            // add the fireVetoableChange method call
            block.addStatement(stmt(callThisX("fireVetoableChange", args(
                    constX(propertyName), oldValue, proposedValue))));

            // call the existing block, which will presumably set the value properly
            block.addStatement(code);

            if (bindable) {
                // get the new value to emit in the event
                block.addStatement(declS(newValue, callThisX(getterName)));

                // add the firePropertyChange method call
                block.addStatement(stmt(callThisX("firePropertyChange", args(constX(propertyName), oldValue, newValue))));
            }

            // replace the existing code block with our new one
            setter.setCode(block);
        }
    }
411438
function buildUpdateFn(element, className, attrs) {
    return function updateAttrValue(fallback) {
      if (!needsInterpolation(fallback)) {
        // Do not modify the element's attribute value; so
        // uses '<ui-layout layout="/api/sidebar.html" />' will not
        // be affected. Just update the attrs value.
        attrs[attrs.$normalize(className)] = fallback;
      }
    };
  }
1268725
function(el,prop,val,ret,args,action)
            {
              var e = new _changeEvent(el,prop,val,ret,args,action,'update');
              
              if(el.__kb !== undefined)
              {
                var localAttrListeners = el.__kb._attrUpdateListeners,
                    localStyleListeners = el.__kb._styleUpdateListeners,
                    localParentAttrListeners = el.__kb._parentAttrUpdateListeners,
                    localParentStyleListeners = el.__kb._parentStyleUpdateListeners;
              
                if(localAttrListeners[prop] !== undefined)
                {
                  loopListener(localAttrListeners[prop],e);
                }

                if(e._stopPropogation === undefined && localStyleListeners[prop] !== undefined)
                {
                  loopListener(localStyleListeners[prop],e);
                }
                
                if(e._stopPropogation === undefined && localAttrListeners[_all] !== undefined)
                {
                  loopListener(localAttrListeners[_all],e);
                  if(e._stopPropogation === undefined)
                  {
                    loopListener(localStyleListeners[_all],e);
                  }
                }
                
                if(e._stopPropogation === undefined && localParentAttrListeners[prop] !== undefined)
                {
                  loopParentListener(localParentAttrListeners[prop],e);
                }

                if(e._stopPropogation === undefined && localParentStyleListeners[prop] !== undefined)
                {
                  loopParentListener(localParentStyleListeners[prop],e);
                }
                
                if(e._stopPropogation === undefined && localParentAttrListeners[_all] !== undefined)
                {
                  loopParentListener(localParentAttrListeners[_all],e);

                  if(e._stopPropogation === undefined)
                  {
                    loopParentListener(localParentStyleListeners[_all],e);
                  }
                }
              
              }
              
              if(e._stopPropogation === undefined && _attrUpdateListeners[prop] !== undefined)
              {
                loopListener(_attrUpdateListeners[prop],e);
              }

              if(e._stopPropogation === undefined && _styleUpdateListeners[prop] !== undefined)
              {
                loopListener(_styleUpdateListeners[prop],e);
              }
              
              if(e._stopPropogation === undefined && _attrUpdateListeners[_all] !== undefined)
              {
                loopListener(_attrUpdateListeners[_all],e);
                if(e._stopPropogation === undefined)
                {
                  loopListener(_styleUpdateListeners[_all],e);
                }
              }

              if(e._preventDefault !== undefined) return false;

              return true;
            }
1119244
def httprettified(test):
    ""
    def decorate_class(klass):
        for attr in dir(klass):
            if not attr.startswith('test_'):
                continue

            attr_value = getattr(klass, attr)
            if not hasattr(attr_value, "__call__"):
                continue

            setattr(klass, attr, decorate_callable(attr_value))
        return klass

    def decorate_callable(test):
        @functools.wraps(test)
        def wrapper(*args, **kw):
            httpretty.reset()
            httpretty.enable()
            try:
                return test(*args, **kw)
            finally:
                httpretty.disable()
        return wrapper

    if isinstance(test, ClassTypes):
        return decorate_class(test)
    return decorate_callable(test)
479393
def update(cls):
        

        class NewPopupUpdateView(PopupUpdateView, cls.parent_class):
            model = cls.model
            form_class = cls.form_class
            popup_name = cls.get_class_verbose_name()
            template_name = cls.get_template_name_update()
            permission_required = cls.get_permission_required('update')

            def get_context_data(self, **kwargs):
                kwargs.update(cls.context_for_all)
                kwargs.update(cls.context_for_update)
                return super(NewPopupUpdateView, self).get_context_data(**kwargs)

        return NewPopupUpdateView
964761
def update(self, **kwargs):
    """"""
    for key, value in kwargs.items():
      setattr(self, key, value)