code: def process_figure_for_rasterizing(
      fig, bbox_inches_restore, fixed_dpi=None
  ):
      """
      This need to be called when figure dpi changes during the drawing
      (e.g., rasterizing). It recovers the bbox and re-adjust it with
      the new dpi.
      """
  
      bbox_inches, restore_bbox = bbox_inches_restore
      restore_bbox()
      r = adjust_bbox(fig, bbox_inches, fixed_dpi)
  
      return bbox_inches, r
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import six
  from matplotlib.transforms import Bbox, TransformedBbox, Affine2D
label_desc: Use image node_id 2 for calling a global function with example usage: process_figure_for_rasterizing(fig, bbox_inches_restore, fixed_dpi) and returns: bbox_inches,  r