docstr: Check whether 'hypothesis', 'premise and 'y' is legal
  
  :param dict data: contains 'hypothesis', 'premise', 'y' keys.
  :return:
code: def check_data(self, data):
      r"""
      Check whether 'hypothesis', 'premise and 'y' is legal
  
      :param dict data: contains 'hypothesis', 'premise', 'y' keys.
      :return:
  
      """
      assert "hypothesis" in data and isinstance(
          data["hypothesis"], str
      ), (
          "hypothesis should be in data, and "
          "the type of context should be str"
      )
      assert "premise" in data and isinstance(
          data["premise"], str
      ), "premise should be in data, and the type of context should be str"
      assert "y" in data, (
          "y should be in data, and y can be "
          "entailment, neutral and contradiction"
      )
  
file_path: textflint/textflint/input/component/sample/nli_sample.py
imports: from .sample import Sample
  from ..field import Field, TextField
label_desc: Use image node_id 3 for calling the NLISample obj's underlying member method code with example usage: obj.check_data(data) without return types