Clones self and merges clone with sub-component specific information

        Parameters
        ----------

        key : str
            Key specifying which sub-component

        Returns `ModelComponentInfo` object
977006
def clone_and_merge_sub(self, key):
        
        new_comp = copy.deepcopy(self)
        #sub_com = self.components[key]
        new_comp.components = None
        new_comp.comp_key = key
        return new_comp
385472
def copy(self, key=None):
        
        other = self.__class__(
            self.__iter__(),
            self.maxlen,
            redis=self.redis,
            key=key,
            writeback=self.writeback,
        )

        return other
187047
def from_key(cls, *args):
        
        key = args if len(args) > 1 else args[0]
        return cls._instances.get(key, None)
446609
def getKey(self, key):
		
		data = self.getDictionary()
		if key in data:
			return data[key]
		else:
			return None
689374
function ifModelAndKey(component, callback) {
        var model = firstModel(component);
        if (model) {
            var key = getKey(component);
            return callback(key, model);
        }
    }
1205951
@SuppressWarnings("unchecked")
    public T cloneObject(String key) {
        if (this.objects.containsKey(key)) {
            T object = this.objects.get(key);
            if (object != null) {
                try {
                    return (T) object.clone();
                } catch (Exception ex) {
                    throw new RuntimeException(ex);
                }
            }
            return null;
        }
        throw new RuntimeException("[cloning error] object by name <" + key
                + "> not registered in " + getClass().getSimpleName());
    }
544924
def save(self, key, kw):
        
        if key not in self:
            obj = hdf5.LiteralAttrs()
        else:
            obj = self[key]
        vars(obj).update(kw)
        self[key] = obj
        self.flush()
1345513
def init_instance(self, key):
        
        with self._mor_lock:
            if key not in self._mor:
                self._mor[key] = {}
494293
def injectables_spec_for_key(self, key):
    
    specs = self.injectables_specs_for_key(key)
    specs_len = len(specs)
    if specs_len == 0:
      return None
    if specs_len != 1:
      raise self.TooManySpecsForKey('injectables spec mapping for key included {} elements, '
                                    'expected 1'.format(specs_len))
    return specs[0]
433403
def replace_key(self, key, new_key):
        
        heap = self._heap
        position = self._position
        if new_key in self:
            raise KeyError('%s is already in the queue' % repr(new_key))
        pos = position.pop(key)  # raises appropriate KeyError
        position[new_key] = pos
        heap[pos].key = new_key
1205662
def key(self, key=""):
    
    params = join_params(self.parameters, {"key": key})

    return self.__class__(**params)
819188
def merged_sourcekey(self, **kwargs):
        
        kwargs_copy = self.base_dict.copy()
        kwargs_copy.update(**kwargs)
        self._replace_none(kwargs_copy)        
        try:
            return NameFactory.merged_sourcekey_format.format(**kwargs_copy)
        except KeyError:
            return None
752717
def clone(self, _, scene):
        
        # Assume that the application creates a new set of Frames and so we need to match up the
        # data from the old object to the new (using the name).
        if self._name is not None:
            for effect in scene.effects:
                if isinstance(effect, Frame):
                    if effect._name == self._name:
                        effect.data = self.data
                        for layout in self._layouts:
                            layout.update_widgets(new_frame=effect)
27281
def clone(self, **kwargs):
        '''
        
        '''
        child = ChildContextDict(parent=self, threadsafe=self._threadsafe, overrides=kwargs)
        return child
1122246
def add_subkey(self, subkey):
        
        if self.key.lower() == 'atoms' or not self.has_subkey(subkey):
            self.subkeys.append(subkey)
162913
def key(self):
        
        return self.make_key(
            self._instance._name,
            self._instance.pk.get(),
            self.name,
        )
692409
def rename(self, key, newkey):
        
        if key == newkey:
            raise ValueError("key and newkey are the same")
        fut = self.execute(b'RENAME', key, newkey)
        return wait_ok(fut)