Return handler which scheme name matches the specified one

		:param scheme_name: scheme name to search for
		:return: WSchemeHandler class or None (if matching handler was not found)
776072
def handler(self, scheme_name=None):
		
		if scheme_name is None:
			return self.__default_handler_cls
		for handler in self.__handlers_cls:
			if handler.scheme_specification().scheme_name() == scheme_name:
				return handler
602959
def system_methodSignature(self, method_name: str)->str:
        
        method = None
        if method_name in self.funcs:
            method = self.funcs[method_name]
        elif self.instance is not None:
            try:
                method = resolve_dotted_attribute(
                    self.instance,
                    method_name,
                    self.allow_dotted_names
                )
            except AttributeError:
                pass
        if method is None:
            return ""
        else:
            return str(inspect.signature(method))
715900
def get_handler(self, request):
        
        try:
            f = self._json_rpc_methods[request.method]

        except (AttributeError, KeyError):  # pragma no coverage
            raise RPCMethodError("Received invalid method '{}'".format(request.method))

        return f
24455
def cookie_name_check(cookie_name):
		
		cookie_match = WHTTPCookie.cookie_name_non_compliance_re.match(cookie_name.encode('us-ascii'))
		return len(cookie_name) > 0 and cookie_match is None
1274424
def http_handler(name, logname, host, url, method="GET"):
    

    return wrap_log_handler(logging.handlers.HTTPHandler(
        host, url, method=method))
570794
def find_in_registry(category = None, namespace = None, name = None):
    
    selected_registry = registry
    if category is not None:
        selected_registry = [re for re in selected_registry if re.category==category]
    if namespace is not None:
        selected_registry = [re for re in selected_registry if re.namespace==namespace]
    if name is not None:
        selected_registry = [re for re in selected_registry if re.name==name]
    if len(selected_registry)>0:
        return [sr.cls for sr in selected_registry]

    return None
8088
def reflect_runtime_member(self, name):
        
        for scope in reversed(self.scopes):
            try:
                return structured.reflect_runtime_member(scope, name)
            except (NotImplementedError, KeyError, AttributeError):
                continue

        return protocol.AnyType
1123668
def get_dep(self, name: str) -> str:
        
        deps = self.meta["dependencies"]
        for d in deps:
            if d["model"] == name:
                return d
        raise KeyError("%s not found in %s." % (name, deps))
199738
def get_event_name(lambda_name, name):
        
        return '{prefix:.{width}}-{postfix}'.format(prefix=lambda_name, width=max(0, 63 - len(name)), postfix=name)[:64]
709019
def find_message_handler(self, handler_name, handler_type='primary'):
        """"""
        ret = lib.EnvFindDefmessageHandler(
            self._env, self._cls, handler_name.encode(), handler_type.encode())
        if ret == 0:
            raise CLIPSError(self._env)

        return MessageHandler(self._env, self._cls, ret)
1216907
def lookupByName(self, name):
        
        res = yield queue.executeInThread(self.connection.lookupByName, name)
        return self.DomainClass(self, res)
558336
def match(self, name):
        
        if self.method == Ex.Method.PREFIX:
            return name.startswith(self.value)
        elif self.method == Ex.Method.SUFFIX:
            return name.endswith(self.value)
        elif self.method == Ex.Method.CONTAINS:
            return self.value in name
        elif self.method == Ex.Method.EXACT:
            return self.value == name
        elif self.method == Ex.Method.REGEX:
            return re.search(self.value, name)
        return False
1333336
def system_methodHelp(self, method_name: str)->str:
        
        method = None
        if method_name in self.funcs:
            method = self.funcs[method_name]
        elif self.instance is not None:
            try:
                method = resolve_dotted_attribute(
                    self.instance,
                    method_name,
                    self.allow_dotted_names
                )
            except AttributeError:
                pass
        if method is None:
            return ""
        else:
            return pydoc.getdoc(method)
553260
def _names_mce(method, wrap_number=None):
    
    methods_name = method.__name__
    methods_class = method.im_class
    if wrap_number!=None:
        enabled_attr_name = "__wrap_enabled" + str(wrap_number) + methods_name
        if not hasattr(methods_class, enabled_attr_name):
            raise AspectsException("Method %s does not have wrap with number %s"
                                   % (methods_name, wrap_number))
    else: enabled_attr_name=None
    return methods_name, methods_class, enabled_attr_name
767475
def _name_helper(name: str):
    
    name = name.rstrip()
    if name.endswith(('.service', '.socket', '.target')):
        return name
    return name + '.service'
521017
def get_method(self, name, entry_point, protocol):
        """"""

        if name in self._registry and self._registry[name].is_valid_for(entry_point, protocol):
            return self._registry[name]

        return None
313717
def has_event_handler(self, handler, event_name=None):
        
        if event_name is not None:
            if event_name not in self._event_handlers:
                return False
            events = [event_name]
        else:
            events = self._event_handlers
        for e in events:
            for h, _, _ in self._event_handlers[e]:
                if h == handler:
                    return True
        return False