Like _add_value_to_dict_bf but will not add v if another
    element in under key `k` has the same value.
488317
def _add_uniq_value_to_dict_bf(d, k, v):
    
    prev = d.get(k)
    if prev is None:
        d[k] = v
    elif isinstance(prev, list):
        if not isinstance(v, list):
            v = [v]
        for sel in v:
            found = False
            for el in prev:
                if el == sel:
                    found = True
                    break
            if not found:
                prev.append(sel)
    else:
        if isinstance(v, list):
            prev = [prev]
            for sel in v:
                found = False
                for el in prev:
                    if el == sel:
                        found = True
                        break
                if not found:
                    prev.append(sel)
            if len(prev) > 1:
                d[k] = prev
        elif prev != v:
            d[k] = [prev, v]
262646
def keys_with_value(dictionary, value):
        ""

        subset = [key for key in dictionary if dictionary[key] == value]

        return subset
1072779
def add k , v
      raise "Key should be symbol not #{k}" unless k.is_a? Symbol
      if( v.is_simple?)
        @simple[k] = v
      else
        @complex[k] = v
      end
    end
512052
def _merge(d, u):
    
    for k, v in u.items():
        # if we have a mapping, recursively merge the values
        if isinstance(v, collections.Mapping):
            d[k] = _merge(d.get(k, {}), v)

        # if d (the dict to merge into) is a dict, just add the
        # value to the dict.
        elif isinstance(d, collections.MutableMapping):
            d[k] = v

        # otherwise if d (the dict to merge into) is not a dict (e.g. when
        # recursing into it, `d.get(k, {})` may not be a dict), then do what
        # `update` does and prefer the new value.
        #
        # this means that something like `{'foo': 1}` when updated with
        # `{'foo': {'bar': 1}}` would have the original value (`1`) overwritten
        # and would become: `{'foo': {'bar': 1}}`
        else:
            d = {k: v}

    return d
551329
def dict_match(a, b):
    
    res = []
    for k, v in a.items():
        try:
            res.append(b[k] == v)
        except KeyError:
            pass
    return all(res)
106730
boolean putIfMissing(Key key, V value){

		if(containsKey(key)){
			return false;
		}

		put(key, value);

		return true;
	}
1260006
def _recursive_dict_update(dict_, other, **kwargs):
    
    overwrite = kwargs['overwrite']

    for key, other_value in iteritems(other):
        if key in dict_:
            value = dict_[key]
            if is_mapping(value) and is_mapping(other_value):
                _recursive_dict_update(value, other_value, overwrite=overwrite)
                continue
        if overwrite:
            dict_[key] = other_value
        else:
            dict_.setdefault(key, other_value)
805185
def normalize_keys(self, value):
        
        return dict((self.normalize_name(k), v) for k, v in value.items())
82573
def lookup(self,value):
        
        for k,v in self.iteritems():
            if value == v:
                return k
        return None
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
445863
def dict_of_lists_add(dictionary, key, value):
    # type: (DictUpperBound, Any, Any) -> None
    
    list_objs = dictionary.get(key, list())
    list_objs.append(value)
    dictionary[key] = list_objs
462848
def update(self, dict):
        """"""
        for k,v in dict.items():
            self[k] = v
774854
def set_val(self, key:str, val:Any, bn_groups:bool=True)->Any:
        ""
        if is_tuple(val): val = [(v1,v2) for v1,v2 in zip(*val)]
        for v,pg1,pg2 in zip(val,self.opt.param_groups[::2],self.opt.param_groups[1::2]):
            pg1[key] = v
            if bn_groups: pg2[key] = v
        return val
325627
def find_lt(self, k):
        
        i = bisect_left(self._keys, k)
        if i:
            return self._items[i - 1]
        raise ValueError('No item found with key below: %r' % (k,))
509503
public boolean add(final K key, final V value) {
        if (!this.map.containsKey(key)) {
            this.map.put(key, new ArrayList<V>());
        }
        return this.map.get(key).add(value);
    }
127456
def AddValue(self, registry_value):
    
    name = registry_value.name.upper()
    if name in self._values:
      raise KeyError(
          'Value: {0:s} already exists.'.format(registry_value.name))

    self._values[name] = registry_value
805503
def push(self, value=None):
        
        if not isinstance(value, Bottle):
            value = Bottle()
        self.append(value)
        return value