code: def query_kinds(self, kind):
          
          logging.debug(_('querying %s'), kind)
          if kind is None:
              return self._kind_id_to_name.items()
          if kind.isdigit():
              kind_name = self.kind_id_to_name(int(kind))
              if kind_name:
                  kind = (kind, kind_name)
              else:
                  logging.warning(_('id not found: %s'), kind)
                  kind = None
          else:
              kind_id = self.kind_name_to_id(kind)
              if kind_id:
                  kind = (kind_id, kind)
              else:
                  logging.warning(_('name not found: %s'), kind)
                  kind = None
          return [kind]
docs: Query kinds.