code: def rel2id(self, xs):
          
          if isinstance(xs, list):
              return [self._rel2id[x] for x in xs]
          return self._rel2id[xs]
docs: Map relation(s) to id(s)
  
          Parameters
          ----------
          xs : str or list
              relation
  
          Returns
          -------
          int or list
              id(s) of relation