code: def _get_name_info(name_index, name_list):
      
      argval = name_index
      if (name_list is not None
          # PyPY seems to "optimize" out constant names,
          # so we need for that:
          and name_index < len(name_list)):
          argval = name_list[name_index]
          argrepr = argval
      else:
          argrepr = repr(argval)
      return argval, argrepr
docs: Helper to get optional details about named references
  
         Returns the dereferenced name as both value and repr if the name
         list is defined.
         Otherwise returns the name index and its repr().