code: def make_safe_parse_float(parse_float: ParseFloat) -> ParseFloat:
      """A decorator to make `parse_float` safe.
  
      `parse_float` must not return dicts or lists, because these types
      would be mixed with parsed TOML tables and arrays, thus confusing
      the parser. The returned decorated callable raises `ValueError`
      instead of returning illegal types.
      """
      # The default `float` callable never returns illegal types. Optimize it.
      if parse_float is float:  # type: ignore[comparison-overlap]
          return float
  
      def safe_parse_float(float_str: str) -> Any:
          float_value = parse_float(float_str)
          if isinstance(float_value, (dict, list)):
              raise ValueError(
                  "parse_float must not return dicts or lists"
              )
          return float_value
  
      return safe_parse_float
  
imports: from __future__ import annotations
  from collections.abc import Iterable
  import string
  from types import MappingProxyType
  from typing import Any, BinaryIO, NamedTuple
  from ._re import RE_DATETIME, RE_LOCALTIME, RE_NUMBER, match_to_datetime, match_to_localtime, match_to_number
  from ._types import Key, ParseFloat, Pos
label_desc: Use image node_id 25 for calling a global function with example usage: make_safe_parse_float(parse_float) and returns: safe_parse_float, float, float_value