code: def get_constant(value):
      
      if type(value) is str:
          if hasattr(scipy.constants, value):
              return getattr(scipy.constants, value)
          else:
              return scipy.constants.physical_constants[value][0]
      else:
          return value
docs: When `value` is a string, get the corresponding constant from [`scipy.constants`][1].
  
      [1]: http://docs.scipy.org/doc/scipy/reference/constants.html