Returns the plugin class object with the given name.
        Or if a name is not given, the complete plugin dictionary is returned.

        :param name: Name of a plugin
        :return: None, single plugin or dictionary of plugins
540821
def get(self, name=None):
        
        if name is None:
            return self._classes
        else:
            if name not in self._classes.keys():
                return None
            else:
                return self._classes[name]
65232
def named(self, name):
        ''''''
        name = self.serialize(name)
        return self.get_by('name', name)
811897
def _get(self, plugin_name):
        

        for p in self._plugins:
            if p.name == plugin_name:
                return p

        return None
1261573
def cls_get_by_name(cls, name):
    
    try:
        val = getattr(cls, name)
    except AttributeError:
        for attr in (a for a in dir(cls) if not a.startswith('_')):
            try:
                val = getattr(cls, attr)
            except AttributeError:
                # Is known to happen.
                continue
            valname = getattr(val, 'name', None)
            if valname == name:
                return val
        else:
            raise ValueError('No {} with that name: {}'.format(
                cls.__name__,
                name,
            ))
    else:
        return val
723597
def get_plugin(cls, name: str) -> Type[ConnectionPlugin]:
        
        if name not in cls.available:
            raise ConnectionPluginNotRegistered(
                f"Connection {name!r} is not registered"
            )
        return cls.available[name]
844805
def get_class(classname):
    
    parts = classname.split('.')
    module = ".".join(parts[:-1])
    m = __import__(module)
    for comp in parts[1:]:
        m = getattr(m, comp)
    return m
754593
def get_plugins_by_name(self, *names):
        
        self._import_plugins()
        plugin_instances = []
        for name in names:
            if isinstance(name, six.string_types):
                try:
                    plugin_instances.append(self.plugins[name.lower()])
                except KeyError:
                    raise PluginNotFound("No plugin named '{0}'.".format(name))
            elif isinstance(name, type) and issubclass(name, ContentPlugin):
                # Will also allow classes instead of strings.
                plugin_instances.append(self.plugins[self._name_for_model[name.model]])
            else:
                raise TypeError("get_plugins_by_name() expects a plugin name or class, not: {0}".format(name))
        return plugin_instances
1222974
def get_field(self, name):
        
        # TODO could use a generator here
        prog = re.compile(name)
        l = []
        for i in self.get_classes():
            for j in i.get_fields():
                if prog.match(j.get_name()):
                    l.append(j)
        return l
595980
def find_lexer_class(name):
    
    if name in _lexer_cache:
        return _lexer_cache[name]
    # lookup builtin lexers
    for module_name, lname, aliases, _, _ in itervalues(LEXERS):
        if name == lname:
            _load_lexers(module_name)
            return _lexer_cache[name]
    # continue with lexers from setuptools entrypoints
    for cls in find_plugin_lexers():
        if cls.name == name:
            return cls
138966
def get(self, name=None, plugin=None):
        
        if plugin is not None:
            if name is None:
                shared_objects_list = {}
                for key in self._shared_objects.keys():
                    if self._shared_objects[key].plugin == plugin:
                        shared_objects_list[key] = self._shared_objects[key]
                return shared_objects_list
            else:
                if name in self._shared_objects.keys():
                    if self._shared_objects[name].plugin == plugin:
                        return self._shared_objects[name]
                    else:
                        return None
                else:
                    return None
        else:
            if name is None:
                return self._shared_objects
            else:
                if name in self._shared_objects.keys():
                    return self._shared_objects[name]
                else:
                    return None
722033
def load_class(module_name, class_name):
    
    try:
        plugmod = import_module(module_name)
    except Exception as exc:
        warn("Importing built-in plugin %s.%s raised an exception: %r" %
             (module_name, class_name, repr(exc)), ImportWarning)
        return None
    else:
        return getattr(plugmod, class_name)
49474
def get_module_plugins(module, classobj):
    
    try:
        names = module.__all__
    except AttributeError:
        names = [x for x in vars(module) if not x.startswith('_')]
    for name in names:
        try:
            obj = getattr(module, name)
        except AttributeError:
            continue
        try:
            if issubclass(obj, classobj):
                yield obj
        except TypeError:
            continue
1108981
def get_plugins_qs(cls):
        
        if is_plugin_point(cls):
            point_pythonpath = cls.get_pythonpath()
            return Plugin.objects.filter(point__pythonpath=point_pythonpath,
                                         status=ENABLED).\
                order_by('index')
        else:
            raise Exception(_('This method is only available to plugin point '
                              'classes.'))
938199
def load_plug_in(self, name):
        
        if not isinstance(name, basestring):
            raise TypeError("name can only be an instance of type basestring")
        plug_in_name = self._call("loadPlugIn",
                     in_p=[name])
        return plug_in_name
31719
def check_name(self, name=None):
        '''
        
        '''
        if name:
            self.plugin_info['check_name'] = name

        if self.plugin_info['check_name'] is not None:
            return self.plugin_info['check_name']

        return self.__class__.__name__
1349978
def get_serializer(instance, plugin=None, model=None, *args, **kwargs):
    
    serializer_class = get_serializer_class(plugin=plugin, model=model)
    if 'read_only' not in kwargs:
        kwargs['read_only'] = True
    return serializer_class(instance, *args, **kwargs)
1216907
def lookupByName(self, name):
        
        res = yield queue.executeInThread(self.connection.lookupByName, name)
        return self.DomainClass(self, res)