code: def only_display_image(figure, shape):
      """Set up a figure so that the image occupies the entire figure
  
      figure - a matplotlib figure
      shape - i/j size of the image being displayed
      """
      assert isinstance(figure, matplotlib.figure.Figure)
      figure.set_frameon(False)
      ax = figure.axes[0]
      ax.set_axis_off()
      figure.subplots_adjust(0, 0, 1, 1, 0, 0)
      dpi = figure.dpi
      width = float(shape[1]) / dpi
      height = float(shape[0]) / dpi
      figure.set_figheight(height)
      figure.set_figwidth(width)
      bbox = matplotlib.transforms.Bbox(
          numpy.array([[0.0, 0.0], [width, height]])
      )
      transform = matplotlib.transforms.Affine2D(
          numpy.array([[dpi, 0, 0], [0, dpi, 0], [0, 0, 1]])
      )
      figure.bbox = matplotlib.transforms.TransformedBbox(
          bbox, transform
      )
  
file_path: CellProfiler/src/frontend/cellprofiler/gui/tools.py
imports: import io
  import centrosome.cpmorphology
  import imageio
  import matplotlib
  import matplotlib.figure
  import matplotlib.transforms
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: only_display_image(figure, shape) without return types