parameters: (self, plugin)
return_statement: return removed
docstring: Uninstall plugins. Pass an instance to remove a specific plugin, a type
              object to remove all plugins that match that type, a string to remove
              all plugins with a matching ``name`` attribute or ``True`` to remove all
              plugins. Return the list of removed plugins.
docstring_summary: Uninstall plugins. Pass an instance to remove a specific plugin, a type
              object to remove all plugins that match that type, a string to remove
              all plugins with a matching ``name`` attribute or ``True`` to remove all
              plugins. Return the list of removed plugins.
docstring_tokens: Uninstall plugins . Pass an instance to remove a specific plugin a type object to remove all plugins that match that type a string to remove all plugins with a matching name attribute or True to remove all plugins . Return the list of removed plugins .
function: def uninstall(self, plugin):
          ''' Uninstall plugins. Pass an instance to remove a specific plugin, a type
              object to remove all plugins that match that type, a string to remove
              all plugins with a matching ``name`` attribute or ``True`` to remove all
              plugins. Return the list of removed plugins. '''
          removed, remove = [], plugin
          for i, plugin in list(enumerate(self.plugins))[::-1]:
              if remove is True or remove is plugin or remove is type(plugin) \
              or getattr(plugin, 'name', True) == remove:
                  removed.append(plugin)
                  del self.plugins[i]
                  if hasattr(plugin, 'close'): plugin.close()
          if removed: self.reset()
          return removed
function_tokens: def uninstall ( self , plugin ) : removed , remove = [ ] , plugin for i , plugin in list ( enumerate ( self . plugins ) ) [ : : - 1 ] : if remove is True or remove is plugin or remove is type ( plugin ) or getattr ( plugin , 'name' , True ) == remove : removed . append ( plugin ) del self . plugins [ i ] if hasattr ( plugin , 'close' ) : plugin . close ( ) if removed : self . reset ( ) return removed