code: def _get_const_info(const_index, const_list):
      
      argval = const_index
      if const_list is not None:
          argval = const_list[const_index]
  
      # float values nan and inf are not directly representable in Python at least
      # before 3.5 and even there it is via a library constant.
      # So we will canonicalize their representation as float('nan') and float('inf')
      if isinstance(argval, float) and str(argval) in frozenset(['nan', '-nan', 'inf', '-inf']):
          return argval, "float('%s')" % argval
      return argval, repr(argval)
docs: Helper to get optional details about const references
  
         Returns the dereferenced constant and its repr if the constant
         list is defined.
         Otherwise returns the constant index and its repr().