class_docstr: Transforms the polarity of non-target by replacing its opinion words
      with antonyms provided by WordNet or adding the negation that
      pre-defined in our negative word list.
  
  Example::
  
      Original sentence: "BEST spicy tuna roll, great asian salad.
      （Target: spicy tuna roll)"
      Transformed sentence: "BEST spicy tuna roll, not great asian salad."
docstr: Transform data sample to a list of Sample.
  
  :param ~textflint.input.component.sample.ABSAsample sample: input ABSAsample
  :param int n: the number of transformation, in
      ABSA-specific transformations n=1
  :param str field:field name
  :return list: list of transformed ABSAsample
code: def _transform(self, sample, n=1, field="sentence", **kwargs):
      r"""
      Transform data sample to a list of Sample.
  
      :param ~textflint.input.component.sample.ABSAsample sample: input ABSAsample
      :param int n: the number of transformation, in
          ABSA-specific transformations n=1
      :param str field:field name
      :return list: list of transformed ABSAsample
  
      """
      trans_samples = []
      self.sentence = sample.sentence.text
      self.words_list = sample.sentence.words
      self.terms = sample.terms
      self.term_list = sample.term_list
      if sample.trans_id is None:
          self.trans_id = [idx for idx in self.terms]
      else:
          self.trans_id = [sample.trans_id]
  
      for term_id in self.trans_id:
          other_id_list = [idx for idx in self.terms]
          other_id_list.remove(term_id)
          if len(other_id_list) != 0:
              trans_sample = sample.clone(sample)
              trans_words, trans_terms = self._trans_other_polarity(
                  term_id
              )
              trans_sentence = self.get_sentence(
                  trans_words, self.sentence
              )
              trans_sample.update_sentence(trans_sentence)
              trans_sample.update_terms(trans_terms)
              trans_sample.update_term_list(trans_sample)
              trans_sample.trans_id = term_id
              trans_samples.append(trans_sample)
      if trans_samples:
          return trans_samples
  
file_path: textflint/textflint/generation/transformation/ABSA/rev_non.py
imports: from copy import deepcopy
  from ...transformation.ABSA.absa_transformation import ABSATransformation
label_desc: Use image node_id 3 for calling the RevNon obj's underlying member method code with example usage: obj._transform(sample, n, field) and returns: trans_samples