code: def get_node_types(schema_map):
      """
      Utility method to extract node_typename -> node_type mappings
      as defined by the input schema
  
      Parameters:
      -----------
      schema_map : dictionary
          Input schema from which the node_typename -> node_type
          dictionary is created.
  
      Returns:
      --------
      dictionary
          with keys as node type names and values as ids (integers)
      list
          list of ntype name strings
      dictionary
          with keys as ntype ids (integers) and values as node type names
      """
      ntypes = schema_map[constants.STR_NODE_TYPE]
      ntype_ntypeid_map = {e: i for i, e in enumerate(ntypes)}
      ntypeid_ntype_map = {i: e for i, e in enumerate(ntypes)}
      return ntype_ntypeid_map, ntypes, ntypeid_ntype_map
  
imports: import json
  import logging
  import os
  from itertools import cycle
  import constants
  import dgl
  import numpy
  import psutil
  import pyarrow
  import torch
  from dgl.distributed.partition import _dump_part_config
  from pyarrow import csv
label_desc: Use image node_id 6 for calling a global function with example usage: get_node_types(schema_map) and returns: ntype_ntypeid_map,  ntypes,  ntypeid_ntype_map