code: def validate_float_arg(value, name):
      """check penalty number availability, raise ValueError if failed."""
      if (
          not isinstance(value, (float, int))
          or (math.isinf(value) or math.isnan(value))
          or value < 0
      ):
          raise ValueError(
              f"Invalid value for argument {name}: expected a non-negative float."
              f"Received: {name}={value}"
          )
      return float(value)
  
imports: import math
  from keras import ops
  from keras.api_export import keras_export
  from keras.utils.numerical_utils import normalize
label_desc: Use image node_id 1 for calling a global function with example usage: validate_float_arg(value, name) and returns: float