code: def list_by_x(self, item=None):
          
          prs = self._processors
  
          if item is None or item == "cid":  # Default.
              res = [(cid, [prs[cid]]) for cid in sorted(prs.keys())]
  
          elif item in ("type", "extensions"):
              res = list_by_x(prs.values(), item)
          else:
              raise ValueError("keyword argument 'item' must be one of "
                               "None, 'cid', 'type' and 'extensions' "
                               "but it was '%s'" % item)
          return res
docs: :param item: Grouping key, one of "cid", "type" and "extensions"
          :return:
              A list of :class:`Processor` or its children classes grouped by
              given 'item', [(cid, [:class:`Processor`)]] by default