code: def string_to_float(string, default=-1.0, **unused_kwargs):
      """Converts string to float, using default when conversion not possible."""
      try:
          return float(string)
      except ValueError:
          return default
  
file_path: text-to-text-transfer-transformer/t5/data/postprocessors.py
imports: import tensorflow.compat.v2
label_desc: Use image node_id 1 for calling a global function with example usage: string_to_float(string, default) and returns: float, default