assign the DID as the key id, if the DID does not have a '#value'
        at the end, then automatically add a new key value
774160
def assign_did(self, did):
        
        if re.match('^#.*', self._id):
            self._id = did + self._id
        if re.match('^#.*', self._owner):
            self._owner = did + self._owner
706700
def _insert_item(self, key, new_item, instance, is_after):
        """"""
        index = self._get_index_for_insert(key, instance)
        index = index + 1 if is_after else index
        self.__items = self.__items[:index] + new_item + self.__items[index:]
        # Make sure indexing works with new items
        for new_key, new_value in new_item:
            if new_key in self:
                value_list = [val for k, val in self.__items if k == new_key]
                dict_setitem(self, new_key, value_list)
            else:
                dict_setitem(self, new_key, [new_value])
773077
function(key, value) {
    var keys = this.keys,
        values = this.values,
        guid = guidFor(key);

    keys.add(key);
    values[guid] = value;
  }
966592
def add(self, name, value):
        # type: (str, str) -> None
        """"""
        self._last_key = name
        if name in self:
            self._dict[name] = value
            self._as_list[name].append(value)
        else:
            self[name] = value
123670
def add(config = {})
      config.each do |key, value|
        define_setting key.to_sym, value
      end
    end
188294
def add(self, key, value=None):
        
        if value is None:
            value = 2 ** (len(self))

        self[key] = value
        setattr(self, key, self[key])
        return value
493452
def add_key_value(self, key, value):
        
        key = self._metadata_map.get(key, key)
        if key in ['dateAdded', 'lastModified']:
            self._data[key] = self._utils.format_datetime(value, date_format='%Y-%m-%dT%H:%M:%SZ')
        elif key == 'confidence':
            self._data[key] = int(value)
        elif key == 'rating':
            self._data[key] = float(value)
        elif key == 'unique_id':
            self._unique_id = quote_plus(value)
        else:
            self._data[key] = value
671126
def set(key , value)
      index = key_index(key)
      if( index )
        i_values.set(index , value)
      else
        i_keys.push(key)
        i_values.push(value)
      end
      value
    end
910864
def set(self, id, value):
        
        return self.kv.set(self.key_name(id), value)
1290361
def key_edited(self, path, new_key_str):
        
        tree_store_path = self.create_tree_store_path_from_key_string(path) if isinstance(path, string_types) else path
        if self.tree_store[tree_store_path][self.KEY_STORAGE_ID] == new_key_str:
            return

        dict_path = self.tree_store[tree_store_path][self.ID_STORAGE_ID]
        old_value = self.model.state.get_semantic_data(dict_path)
        self.model.state.remove_semantic_data(dict_path)

        if new_key_str == "":
            target_dict = self.model.state.semantic_data
            for element in dict_path[0:-1]:
                target_dict = target_dict[element]
            new_key_str = generate_semantic_data_key(list(target_dict.keys()))

        new_dict_path = self.model.state.add_semantic_data(dict_path[0:-1], old_value, key=new_key_str)
        self._changed_id_to = {':'.join(dict_path): new_dict_path}  # use hashable key (workaround for tree view ctrl)
        self.reload_tree_store_data()
129018
def add_public_key(self, did, public_key):
        
        logger.debug(f'Adding public key {public_key} to the did {did}')
        self._public_keys.append(
            PublicKeyBase(did, **{"owner": public_key, "type": "EthereumECDSAKey"}))
683535
def set_id(self, dxid):
        '''
        
        '''
        if dxid is not None:
            verify_string_dxid(dxid, self._class)

        self._dxid = dxid
1253167
def update(client_id, key, value)
      @clients.each do |hash|
        if hash[:client_id] == client_id
          hash[key] = value
        end
      end
    end
67254
def _buildNewKeyname(self,key,prepend):
        

        if len(prepend+key) <= 8: _new_key = prepend+key
        else: _new_key = str(prepend+key)[:8]

        return _new_key
1036253
def _add_boolean_cli_param(params, key, value):
    '''
    
    '''
    if value is True:
        params.append('--{0}'.format(key))
456733
def add(self, value):
        """"""
        # Raise TypeError if value is not hashable
        hash(value)

        self.redis.sadd(self.key, self._pickle(value))
641588
def add_script(self, key: str, value: str,
                   lineno: Optional[int] = None) -> None:
        ''''''
        # we need a fake directive here because the : directive can be multi-line and
        # we need to borrow the syntax checking of directives here.
        self.statements.append([':', '__script__', ''])
        self.values = [value]
        self._action = key
        self._action_options = value
        if lineno:
            self.lineno = lineno