code: def tag2id(self, xs):
          
          if isinstance(xs, list):
              return [self._tag2id.get(x, self.UNK) for x in xs]
          return self._tag2id.get(xs, self.UNK)
docs: Map tag(s) to id(s)
  
          Parameters
          ----------
          xs : str or list
              tag or tags
  
          Returns
          -------
          int or list
              id(s) of tag(s)