Backport support for original codes.
775665
def get(key, default=-1):
        """"""
        if isinstance(key, int):
            return Certificate(key)
        if key not in Certificate._member_map_:
            extend_enum(Certificate, key, default)
        return Certificate[key]
954267
function escape_code(defaultRenderer) {
  return function(tokens, idx, options, env, slf) {
    tokens[idx].content = tokens[idx].content
      .slice(2, -2)
      .replace(/\\`/g, '__BACK_TICK__');

    return defaultRenderer(tokens, idx, options, env, slf);
  };
}
789403
def init_backends():
    """"""

    global _BACKENDS, _ACTIVE_BACKENDS

    try:
        from .cffi_backend import CFFIBackend
    except ImportError:
        pass
    else:
        _BACKENDS.append(CFFIBackend)

    from .ctypes_backend import CTypesBackend
    from .null_backend import NullBackend

    _BACKENDS.append(CTypesBackend)
    _ACTIVE_BACKENDS = _BACKENDS[:]
    # null isn't active by default
    _BACKENDS.append(NullBackend)
361049
function(newval, oldval) {
		if ([newval, oldval].every(function(val) {
			return val.contains('edbml.$');
		})) {
			var newkeys = gui.KeyMaster.extractKey(newval);
			var oldkeys = gui.KeyMaster.extractKey(oldval);
			if (newkeys && oldkeys) {
				oldkeys.forEach(function(oldkey, i) {
					var newkey = newkeys[i];
					newval = newval.replace(newkey, '');
					oldval = oldval.replace(oldkey, '');
					this._functions[oldkey] = newkey;
				}, this);
				return newval === oldval;
			}
		}
		return false;
	}
1138302
def _apply_search_backrefs(pattern, flags=0):
    """"""

    if isinstance(pattern, (str, bytes)):
        re_verbose = VERBOSE & flags
        if flags & V0:
            re_version = V0
        elif flags & V1:
            re_version = V1
        else:
            re_version = 0
        if not (flags & DEBUG):
            pattern = _cached_search_compile(pattern, re_verbose, re_version, type(pattern))
        else:  # pragma: no cover
            pattern = _bregex_parse._SearchParser(pattern, re_verbose, re_version).parse()
    elif isinstance(pattern, Bregex):
        if flags:
            raise ValueError("Cannot process flags argument with a compiled pattern")
        pattern = pattern._pattern
    elif isinstance(pattern, _REGEX_TYPE):
        if flags:
            raise ValueError("Cannot process flags argument with a compiled pattern!")
    else:
        raise TypeError("Not a string or compiled pattern!")
    return pattern
1135937
def _get_codes(self):
        
        v = self._codes.view()
        v.flags.writeable = False
        return v
217397
def compatcallback(f):
    
    if getattr(click, '__version__', '0.0') >= '2.0':
        return f
    return update_wrapper(lambda ctx, value: f(ctx, None, value), f)
199496
function paramCallback(err) {
                var fn = paramCallbacks[paramIndex++];
                if (err || !fn) return param(err);
                fn(req, res, paramCallback, paramVal, key.name);
            }
280692
def compile_rich(cls, code, path=None, extra_args=None):
        """"""

        return {
            contract_name: {
                'code': '0x' + contract.get('bin_hex'),
                'info': {
                    'abiDefinition': contract.get('abi'),
                    'compilerVersion': cls.compiler_version(),
                    'developerDoc': contract.get('devdoc'),
                    'language': 'Solidity',
                    'languageVersion': '0',
                    'source': code,
                    'userDoc': contract.get('userdoc')
                },
            }
            for contract_name, contract
            in cls.combined(code, path=path, extra_args=extra_args)
        }
1255446
def backend_from_fobj(f):
    """"""
    if magic is None:
        warn("magic lib is not installed; assuming mime type %r" % (
            DEFAULT_MIME))
        return backend_from_mime(DEFAULT_MIME)
    else:
        offset = f.tell()
        try:
            f.seek(0)
            chunk = f.read(MAGIC_BUFFER_SIZE)
            mime = magic.from_buffer(chunk, mime=True)
            return backend_from_mime(mime)
        finally:
            f.seek(offset)
1234068
def _build_codes_reverse(
        codes: Dict[str, Dict[str, str]]) -> Dict[str, Dict[str, str]]:
    
    built = {}  # type: Dict[str, Dict[str, str]]
    for codetype, codemap in codes.items():
        for name, escapecode in codemap.items():
            # Skip shorcut aliases to avoid overwriting long names.
            if len(name) < 2:
                continue
            if built.get(codetype, None) is None:
                built[codetype] = {}
            built[codetype][escapecode] = name
    return built
115505
def get(key, default=-1):
        """"""
        if isinstance(key, int):
            return Checksum(key)
        if key not in Checksum._member_map_:
            extend_enum(Checksum, key, default)
        return Checksum[key]
257038
def get(key, default=-1):
        """"""
        if isinstance(key, int):
            return ErrorCode(key)
        if key not in ErrorCode._member_map_:
            extend_enum(ErrorCode, key, default)
        return ErrorCode[key]
1094324
private void genImportCode() {
        Set<String> imports = new HashSet<String>();
        imports.add("java.util.*");
        imports.add("java.io.IOException");
        imports.add("java.lang.reflect.*");
        imports.add("com.baidu.bjf.remoting.protobuf.code.*");
        imports.add("com.baidu.bjf.remoting.protobuf.utils.*");
        imports.add("com.baidu.bjf.remoting.protobuf.*");
        imports.add("com.google.protobuf.*");

        if (!StringUtils.isEmpty(getPackage())) {
            imports.add(getTargetProxyClassname());
        }

        for (String pkg : imports) {
            templator.setVariable("importPackage", pkg);
            templator.addBlock("imports");
        }
    }
628205
def _handle_mac(self, keycode):
        """"""
        key = self._keyname(unichr(keycode))
        self._output(type="keys", key=key, realkey=key)
301628
def get_backend(backend, path, backends):
    """"""
    m_norm = normalize_vault_path(path)
    for mount_name, values in backends.items():
        b_norm = normalize_vault_path(mount_name)
        if (m_norm == b_norm) and values['type'] == backend:
            return values

    return None
272142
function patchMakeErrFromCode() {
  const func = errors.makeErrFromCode;
  function makeErrFromCodeHook() {
    const err = func.apply(null, arguments);
    patchErrorBody(err, {});
    return err;
  }
  errors.makeErrFromCode = makeErrFromCodeHook;

  // Deprecated.
  // See https://github.com/restify/errors/blob/master/lib/index.js#L126
  errors.codeToHttpError = makeErrFromCodeHook;
}