code: def to_dict(
      transform: Serializable, on_not_implemented_error: str = "raise"
  ) -> Dict[str, Any]:
      """
      Take a transform pipeline and convert it to a serializable representation that uses only standard
      python data types: dictionaries, lists, strings, integers, and floats.
  
      Args:
          transform: A transform that should be serialized. If the transform doesn't implement the `to_dict`
              method and `on_not_implemented_error` equals to 'raise' then `NotImplementedError` is raised.
              If `on_not_implemented_error` equals to 'warn' then `NotImplementedError` will be ignored
              but no transform parameters will be serialized.
          on_not_implemented_error (str): `raise` or `warn`.
      """
      return transform.to_dict(on_not_implemented_error)
  
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 3 for calling a global function with example usage: to_dict(transform, on_not_implemented_error) and returns: transform