class_docstr: DP Sample class to hold the data info and provide atomic operations.
docstr: Validate whether the sample is legal
docstr_tok: ["Validate","whether","the","sample","is","legal"]
code: def is_legal(self):
      r"""
      Validate whether the sample is legal
  
      """
  
      if (
          not len(self.x.words)
          == len(self.postag.field_value)
          == len(self.head.field_value)
          == len(self.deprel.field_value)
      ):
          return False
      for attr in (self.x, self.postag, self.head, self.deprel):
          if "" in attr.field_value:
              return False
      return True
  
file_path: textflint/textflint/input/component/sample/dp_sample.py
imports: from .sample import Sample
  from ..field import ListField, TextField
  from ....common.utils.list_op import get_align_seq, normalize_scope
label_desc: Use image node_id 2 for calling the DPSample obj's underlying member method code with example usage: obj.is_legal() and returns: True, False, False