code: def get_paths_extents(paths, transforms=[]):
      """
      Given a sequence of :class:`Path` objects and optional
      :class:`~matplotlib.transforms.Transform` objects, returns the
      bounding box that encapsulates all of them.
  
      *paths* is a sequence of :class:`Path` instances.
  
      *transforms* is an optional sequence of
      :class:`~matplotlib.transforms.Affine2D` instances to apply to
      each path.
      """
      from .transforms import Bbox, Affine2D
  
      if len(paths) == 0:
          raise ValueError("No paths provided")
      return Bbox.from_extents(
          *_path.get_path_collection_extents(
              Affine2D(), paths, transforms, [], Affine2D()
          )
      )
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import six
  from weakref import WeakValueDictionary
  import numpy
  from .None import _path, rcParams
  from .cbook import _to_unmasked_float_array, simple_linear_interpolation, maxdict
label_desc: Use image node_id 2 for calling a global function with example usage: get_paths_extents(paths, transforms) and returns: Bbox