code: def load(
      filepath: str,
      data_format: str = "json",
      nonserializable: Optional[Dict[str, Any]] = None,
      lambda_transforms: Union[
          Optional[Dict[str, Any]], str
      ] = "deprecated",
  ) -> object:
      """
      Load a serialized pipeline from a json or yaml file and construct a transform pipeline.
  
      Args:
          filepath (str): Filepath to read from.
          data_format (str): Serialization format. Should be either `json` or 'yaml'.
          nonserializable (dict): A dictionary that contains non-serializable transforms.
              This dictionary is required when you are restoring a pipeline that contains non-serializable transforms.
              Keys in that dictionary should be named same as `name` arguments in respective transforms from
              a serialized pipeline.
          lambda_transforms (dict): Deprecated. Use 'nonserizalizable' instead.
      """
      if lambda_transforms != "deprecated":
          warnings.warn(
              "lambda_transforms argument is deprecated, please use 'nonserializable'",
              DeprecationWarning,
          )
          nonserializable = typing.cast(
              Optional[Dict[str, Any]], lambda_transforms
          )
  
      check_data_format(data_format)
      load_fn = json.load if data_format == "json" else yaml.safe_load
      with open(filepath) as f:
          transform_dict = load_fn(f)  # type: ignore
  
      return from_dict(transform_dict, nonserializable=nonserializable)
  
imports: from __future__ import absolute_import
  import json
  import typing
  import warnings
  from abc import ABC, ABCMeta, abstractmethod
  from typing import IO, Any, Callable, Dict, Optional, Tuple, Type, Union
  from albumentations import __version__
label_desc: Use image node_id 8 for calling a global function with example usage: load(filepath, data_format, nonserializable, lambda_transforms) and returns: from_dict