code: def _has_instance(data, dtype):
      
      for item in data:
          _, arr = item
          if isinstance(arr, dtype):
              return True
      return False
docs: Return True if ``data`` has instance of ``dtype``.
      This function is called after _init_data.
      ``data`` is a list of (str, NDArray)