code: def string_to_decimal(value, strict=True):
      
      if is_undefined(value):
          if strict:
              raise ValueError('The value cannot be null')
          return None
  
      try:
          return float(value)
  
      except ValueError:
          raise ValueError(
              'The specified string "%s" does not represent an integer' % value)
docs: Return a decimal corresponding to the string representation of a
      number.
  
      @param value: a string representation of an decimal number.
  
      @param strict:  indicate whether the specified string MUST be of a
          valid decimal number representation.
  
      @return: the decimal value represented by the string.
  
      @raise ValueError: if the string doesn't represent a valid decimal,
          while the argument ``strict`` equals ``True``.