class_docstr: Coref Sample
class_docstr_tok: ["Coref","Sample"]
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.
  
      """
      data = self.dump(with_check=False)
      try:
          self.check_data(data)
      except Exception as e:
          return False
      return True
  
imports: from ....common.settings import ORIGIN, TASK_MASK
  from ....common.utils.fp_utils import *
  from ....common.utils.shift_utils import *
  from .sample import Sample
  from ..field import ListField, TextField
label_desc: Use image node_id 4 for calling the CorefSample obj's underlying member method code with example usage: obj.is_legal() and returns: True, False