docstr: Check whether fields is legal.
  
  :return:
docstr_tok: ["Check","whether","fields","is","legal",".",":","return",":"]
code: def _check_fields(self):
      r"""
      Check whether fields is legal.
  
      :return:
      """
      if isinstance(self.fields, str):
          self.fields = [self.fields]
      elif isinstance(self.fields, list):
          pass
      else:
          raise ValueError(
              f"Task {self.task} not support input fields "
              f"type: {type(self.fields)}"
          )
  
      for field in self.fields:
          if field not in ["premise", "hypothesis", "y"]:
              raise ValueError(
                  f"Task {self.task} not support input fields: {field}"
              )
  
imports: from .generator import Generator
label_desc: Use image node_id 2 for calling the NLIGenerator obj's underlying member method code with example usage: obj._check_fields() without return types