parameters: (datatype_instance)
docstring: Translates a user specified datatype to an instance of the ones defined above.
  
      Valid data types are passed through, and the following type specifications
      are translated to the proper instances:
  
      str, "String" -> String()
      int, "Int64" -> Int64()
      float, "Double" -> Double()
  
      If a data type is not recognized, then an error is raised.
docstring_summary: Translates a user specified datatype to an instance of the ones defined above.
docstring_tokens: Translates a user specified datatype to an instance of the ones defined above .
function: def _normalize_datatype(datatype_instance):
      """
      Translates a user specified datatype to an instance of the ones defined above.
  
      Valid data types are passed through, and the following type specifications
      are translated to the proper instances:
  
      str, "String" -> String()
      int, "Int64" -> Int64()
      float, "Double" -> Double()
  
      If a data type is not recognized, then an error is raised.
      """
      global _simple_type_remap
      if datatype_instance in _simple_type_remap:
          return _simple_type_remap[datatype_instance]
  
      # Now set the protobuf from this interface.
      if isinstance(datatype_instance, (Int64, Double, String, Array)):
          return datatype_instance
  
      elif isinstance(datatype_instance, Dictionary):
          kt = datatype_instance.key_type
  
          if isinstance(kt, (Int64, String)):
              return datatype_instance
  
      raise ValueError("Datatype instance not recognized.")
function_tokens: def _normalize_datatype ( datatype_instance ) : global _simple_type_remap if datatype_instance in _simple_type_remap : return _simple_type_remap [ datatype_instance ] # Now set the protobuf from this interface. if isinstance ( datatype_instance , ( Int64 , Double , String , Array ) ) : return datatype_instance elif isinstance ( datatype_instance , Dictionary ) : kt = datatype_instance . key_type if isinstance ( kt , ( Int64 , String ) ) : return datatype_instance raise ValueError ( "Datatype instance not recognized." )