code: def _name_lookup(names):
      r
      mapper = dict(zip(range(len(names)), names))
  
      def lookup(val):
          return mapper.get(val, 'Unknown')
      return lookup
docs: r"""Create an io helper to convert an integer to a named value.