code: def transform(self, word, column=Profile.GRAPHEME_COL, error=errors.replace):
          
          assert self.op, 'method can only be called with orthography profile.'
  
          if column != Profile.GRAPHEME_COL and column not in self.op.column_labels:
              raise ValueError("Column {0} not found in profile.".format(column))
  
          word = self.op.tree.parse(word, error)
          if column == Profile.GRAPHEME_COL:
              return word
          out = []
          for token in word:
              try:
                  target = self.op.graphemes[token][column]
              except KeyError:
                  target = self._errors['replace'](token)
              if target is not None:
                  if isinstance(target, (tuple, list)):
                      out.extend(target)
                  else:
                      out.append(target)
          return out
docs: Transform a string's graphemes into the mappings given in a different column
          in the orthography profile.
  
          Parameters
          ----------
          word : str
              The input string to be tokenized.
  
          column : str (default = "Grapheme")
              The label of the column to transform to. Default it to tokenize with
              orthography profile.
  
          Returns
          -------
          result : list of lists
              Result of the transformation.