code: def make_typemap(entries):
      if sys.version_info[:2] > (3, 7):
          dict_type = dict
      else:
          from collections import OrderedDict
  
          dict_type = OrderedDict
      typemap = dict_type(
          (typecode, datatype)
          for typecode, datatype in entries
          if datatype != MPI.DATATYPE_NULL
      )
      return typemap
  
imports: import sys
  import itertools
  from mpi4py import MPI
label_desc: Use image node_id 1 for calling a global function with example usage: make_typemap(entries) and returns: typemap