code: def read_entity_name_mapping(entity_names_file):
      """Read mapping from entity mid to names."""
      entity_names = {}
      with open(entity_names_file) as gf:
          if entity_names_file.endswith(".gz"):
              f = gzip.GzipFile(fileobj=gf)
          else:
              f = gf
          for line in f:
              contents = line.strip().split("\t")
              if len(contents) < 2:
                  continue
              # mid, name = contents
              mid = contents[0]
              name = contents[1]
              entity_names["/" + mid] = name
      return entity_names
  
file_path: neural-structured-learning/research/a2n/utils.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import gzip
  import tensorflow
label_desc: Use image node_id 4 for calling a global function with example usage: read_entity_name_mapping(entity_names_file) and returns: entity_names