code: def from_plugin_classname(plugin_classname, exclude_lines_regex=None, **kwargs):
      
      klass = globals()[plugin_classname]
  
      # Make sure the instance is a BasePlugin type, before creating it.
      if not issubclass(klass, BasePlugin):
          raise TypeError
  
      try:
          instance = klass(exclude_lines_regex=exclude_lines_regex, **kwargs)
      except TypeError:
          log.warning(
              'Unable to initialize plugin!',
          )
          raise
  
      return instance
docs: Initializes a plugin class, given a classname and kwargs.
  
      :type plugin_classname: str
      :param plugin_classname: subclass of BasePlugin.
  
      :type exclude_lines_regex: str|None
      :param exclude_lines_regex: optional regex for ignored lines.