docstr: Convert data dict which contains essential information to NMTSample.
  
  :param dict data: contains 'source', 'target' keys.
  :return:
docstr_tok: ["Convert","data","dict","which","contains","essential","information","to","NMTSample",".",":","param","dict","data",":","contains","'source","'",",","'target","'","keys",".",":","return",":"]
code: def load(self, data):
      r"""
      Convert data dict which contains essential information to NMTSample.
  
      :param dict data: contains 'source', 'target' keys.
      :return:
  
      """
      self.source = TextField(data["source"])
      self.target = TextField(data["target"])
      if not self.is_legal():
          raise ValueError(
              "Data sample "
              + str(data)
              + " is not legal, their length of text is 0"
          )
  
file_path: textflint/textflint/input/component/sample/nmt_sample.py
imports: from .sample import Sample
  from ..field import TextField
label_desc: Use image node_id 5 for calling the NMTSample obj's underlying member method code with example usage: obj.load(data) without return types