code: def load_yaml(stream: Any):
      """
      Parse the first YAML document in a stream and produce the corresponding Python object.
      This function support parsing float values like `1e-4`.
  
      Implementation credit: https://stackoverflow.com/questions/30458977/yaml-loads-5e-6-as-string-and-not-a-number
  
      Args:
          stream:
      """
      import yaml
      import re
  
      loader = yaml.SafeLoader
      loader.add_implicit_resolver(
          "tag:yaml.org,2002:float",
          re.compile(
              """^(?:
           [-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+]?[0-9]+)?
          |[-+]?(?:[0-9][0-9_]*)(?:[eE][-+]?[0-9]+)
          |\\.[0-9_]+(?:[eE][-+][0-9]+)?
          |[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*
          |[-+]?\\.(?:inf|Inf|INF)
          |\\.(?:nan|NaN|NAN))$""",
              re.X,
          ),
          list("-+0123456789."),
      )
  
      return yaml.load(stream, Loader=loader)
  
imports: import numbers
  from typing import Any, Dict, Tuple, Union, Iterable
  from pytorch_toolbelt.utils.support import pytorch_toolbelt_deprecated
label_desc: Use image node_id 3 for calling a global function with example usage: load_yaml(stream) and returns: yaml