code: def _is_valid_datatype(datatype_instance):
      """
      Returns true if datatype_instance is a valid datatype object and false otherwise.
      """
  
      # Remap so we can still use the python types for the simple cases
      global _simple_type_remap
      if datatype_instance in _simple_type_remap:
          return True
  
      # Now set the protobuf from this interface.
      if isinstance(datatype_instance, (Int64, Double, String, Array)):
          return True
  
      elif isinstance(datatype_instance, Dictionary):
          kt = datatype_instance.key_type
  
          if isinstance(kt, (Int64, String)):
              return True
  
      return False
  
imports: import numpy
  from ..proto import Model_pb2
label_desc: Use image node_id 1 for calling a global function with example usage: _is_valid_datatype(datatype_instance) and returns: False, True, True, True