code: def float_or_none(value: str) -> Optional[float]:
      """float_or_none.
  
      Examples:
          >>> import argparse
          >>> parser = argparse.ArgumentParser()
          >>> _ = parser.add_argument('--foo', type=float_or_none)
          >>> parser.parse_args(['--foo', '4.5'])
          Namespace(foo=4.5)
          >>> parser.parse_args(['--foo', 'none'])
          Namespace(foo=None)
          >>> parser.parse_args(['--foo', 'null'])
          Namespace(foo=None)
          >>> parser.parse_args(['--foo', 'nil'])
          Namespace(foo=None)
  
      """
      if value.strip().lower() in ("none", "null", "nil"):
          return None
      return float(value)
  
file_path: espnet/espnet2/utils/types.py
imports: from distutils.util import strtobool
  from typing import Optional, Tuple, Union
  import humanfriendly
label_desc: Use image node_id 5 for calling a global function with example usage: float_or_none(value) and returns: float, None