code: def try_float(s, default=None, minimum=None):
      
      if not s:
          return default
      try:
          val = float(s)
      except (TypeError, ValueError):
          raise InvalidNumber(s, label='Invalid float value')
      if (minimum is not None) and (val < minimum):
          val = minimum
      return val
docs: Try parsing a string into a float.
          If None is passed, default is returned.
          On failure, InvalidFloat is raised.