parameters: (number)
return_statement: return float_number
docstring: Ensure that a value is not negative.
docstring_summary: Ensure that a value is not negative.
docstring_tokens: Ensure that a value is not negative .
function: def nonnegative_real(number):
      """Ensure that a value is not negative."""
      try:
          float_number = float(number)
      except Exception as err:
          raise TypeConversionError(
              f"{number} not convertible to float.") from err
      if float_number < 0:
          raise TypeConversionError("Expected a nonnegative real number.")
      return float_number
function_tokens: def nonnegative_real ( number ) : try : float_number = float ( number ) except Exception as err : raise TypeConversionError ( f"{number} not convertible to float." ) from err if float_number < 0 : raise TypeConversionError ( "Expected a nonnegative real number." ) return float_number