Prepends the configured prefix to the key (if applicable).

        :param key: The unprefixed key.
        :return: The key with any configured prefix prepended.
436352
def _qualified_key(self, key):
        
        pfx = self.key_prefix if self.key_prefix is not None else ''
        return '{}{}'.format(pfx, key)
894149
function prefixKey(key) {
    if (self.nameSpace.length > 0 && !key.startsWith(self.nameSpace)) {
      return `${self.nameSpace}:${key}`
    }
    return key;
  }
55532
def add(self, key):
        
        if key not in self.map:
            self.map[key] = len(self.items)
            self.items.append(key)
        return self.map[key]
1338656
def prefix_dict_keys(d: Dict[str, Any], prefix: str) -> Dict[str, Any]:
    
    result = {}  # type: Dict[str, Any]
    for k, v in d.items():
        result[prefix + k] = v
    return result
605113
function _prependPath(key, base) {
    if ((typeof key) === "number" || key.match(/^[0-9]+$/))
        key = "[" + key + "]";
    else if (!key.match(Match.IdentifierString) || _jsKeywords.indexOf(key) !== -1)
        key = JSON.stringify([key]);

    if (base && base[0] !== "[")
        return key + '.' + base;
    return key + base;
}
1174236
public void setPrefix(String key, String prefix) {
		PdfName fieldname = new PdfName(key);
		PdfObject o = get(fieldname);
		if (o == null)
			throw new IllegalArgumentException("You must set a value before adding a prefix.");
		PdfDictionary dict = new PdfDictionary(PdfName.COLLECTIONSUBITEM);
		dict.put(PdfName.D, o);
		dict.put(PdfName.P, new PdfString(prefix, PdfObject.TEXT_UNICODE));
		put(fieldname, dict);
	}
167226
def _clean_up_key(self, key):
        
        for n in self.naughty: key = key.replace(n, '_')
        return key
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
1211969
private String getPrefixKey(String key, SortedMap<String, ?> whiteList)
  {
    String prefixKey = null;
    if (whiteList.containsKey(key)) {
      return key;
    }
    SortedMap<String, ?> headMap = whiteList.headMap(key);
    if (!headMap.isEmpty() && key.startsWith(headMap.lastKey())) {
      prefixKey = headMap.lastKey();
    }
    return prefixKey;
  }
602145
def make_storage_key(portal_type, prefix=None):
    
    key = portal_type.lower()
    if prefix:
        key = "{}-{}".format(key, prefix)
    return key
1099971
def in_config(self, key):
        
        # if the requested key is an alias, then return the proper key
        key = self._real_key(key)

        exists = self._config.get(key)
        return exists
814474
def make_key(self, key, version=None):
        """"""
        return '{}:{}:{}'.format(
            self.prefix,
            version or self.version,
            key,
        )
507962
def _warn_key_unknown(cls, cls_context, key):
        

        context_name = cls_context.__name__
        warnings.warn(cls._WARNING_KEY_UNKNOWN.format(key, context_name))
850928
def _prepend_name_prefix(self, name):
        """"""
        if not self.name_prefix:
            return name
        base = self.name_prefix
        if base[0] != '/':
            base = '/' + base
        if name[0] != '/':
            name = '/' + name
        return base + name
1208613
def _qualified_key(self, key):
        
        fq_key = super(Reader, self)._qualified_key(key)
        return fq_key.lstrip('/')
860728
def addInput(self, key):
        
        if key not in self.inputs:
            self.inputs.append(key)

        root = self.etree
        t_inputs = root.find('inputs')

        if not t_inputs :
            t_inputs = ctree.SubElement(root, 'inputs')

        t_inputs.append(key.etree)

        return True
782792
def get_source(self, key, name_spaces=None, default_prefix=''):
        
        source = self.source or key
        prefix = default_prefix
        if name_spaces and self.name_space and self.name_space in name_spaces:
            prefix = ''.join([name_spaces[self.name_space], ':'])
        return ''.join([prefix, source])