code: def type_error(expected_type, found_type, object_label=None):
      if object_label is None:
          raise DatasetFormatError(
              "Invalid type: expected %s but found %s"
              % (expected_type, found_type)
          )
      raise DatasetFormatError(
          "Invalid type for '%s': expected %s but found %s"
          % (object_label, expected_type, found_type)
      )
  
file_path: snips-nlu/snips_nlu/common/dataset_utils.py
imports: from snips_nlu.constants import INTENTS, UTTERANCES, DATA, SLOT_NAME, ENTITY
  from snips_nlu.exceptions import DatasetFormatError
label_desc: Use image node_id 1 for calling a global function with example usage: type_error(expected_type, found_type, object_label) without return types