class_docstr: transform and retrieve features of RESample
docstr: output data sample
  
  :return dict: containing x, subj, obj, y and sample_id
docstr_tok: ["output","data","sample",":","return","dict",":","containing","x",",","subj",",","obj",",","y","and","sample_id"]
code: def dump(self):
      r"""
      output data sample
  
      :return dict: containing x, subj, obj, y and sample_id
  
      """
      if not self.is_legal():
          raise ValueError(
              "Data sample {0} is not legal, "
              "entity index exceeds sentence length.".format(self.data)
          )
  
      return {
          "x": self.x.words,
          "subj": self.subj,
          "obj": self.obj,
          "y": self.y,
          "sample_id": self.sample_id,
      }
  
imports: import random
  import copy
  from .sample import Sample
  from ..field import TextField
  from ....common.settings import TASK_MASK
label_desc: Use image node_id 16 for calling the RESample obj's underlying member method code with example usage: obj.dump() and returns: dict