docstr: Validate whether the sample is legal
  
  :return: bool
docstr_tok: ["Validate","whether","the","sample","is","legal",":","return",":","bool"]
code: def is_legal(self):
      r"""
      Validate whether the sample is legal
  
      :return: bool
  
      """
      if self.y.field_value not in ["0", "1"]:
          return False
      return True
  
file_path: textflint/textflint/input/component/sample/sm_sample.py
imports: from .sample import Sample
  from ..field import Field
  from ..field import TextField
label_desc: Use image node_id 6 for calling the SMSample obj's underlying member method code with example usage: obj.is_legal() and returns: True, False