code: def safe_eval(value):
      
      if not isinstance(value, (str, unicode)):
          return value
  
      try:
          return CONSTANT_EVALS[value]
      except KeyError:
          try:
              return ast.literal_eval(value)
          except StandardError:
              return value
docs: Converts the inputted text value to a standard python value (if possible).
  
      :param      value | <str> || <unicode>
  
      :return     <variant>