class_docstr: Plot a group of elements in a grid layout based on a GridSpace element
  object.
code: def _get_size(self):
      max_dim = max(self.layout.shape)
      # Reduce plot size as GridSpace gets larger
      shape_factor = 1.0 / max_dim
      # Expand small grids to a sensible viewing size
      expand_factor = 1 + (max_dim - 1) * 0.1
      scale_factor = expand_factor * shape_factor
      cols, rows = self.layout.shape
      if isinstance(self.fig_inches, (tuple, list)):
          fig_inches = list(self.fig_inches)
          if fig_inches[0] is None:
              fig_inches[0] = fig_inches[1] * (cols / rows)
          if fig_inches[1] is None:
              fig_inches[1] = fig_inches[0] * (rows / cols)
          return fig_inches
      else:
          fig_inches = (self.fig_inches,) * 2
          return (
              scale_factor * cols * fig_inches[0],
              scale_factor * rows * fig_inches[1],
          )
  
imports: from contextlib import contextmanager
  from itertools import chain
  import matplotlib
  import numpy
  import param
  from matplotlib import animation, gridspec, pyplot, rcParams
  from matplotlib.font_manager import font_scalings
  from mpl_toolkits.mplot3d import Axes3D
  from ...core import AdjointLayout, Collator, CompositeOverlay, Element, Empty, GridMatrix, GridSpace, HoloMap, Layout, NdLayout
  from ...core.options import SkipRendering, Store
  from ...core.util import int_to_alpha, int_to_roman, wrap_tuple_streams
  from ..plot import DimensionedPlot, GenericAdjointLayoutPlot, GenericCompositePlot, GenericElementPlot, GenericLayoutPlot
  from ..util import attach_streams, collate, displayable
  from .util import compute_ratios, fix_aspect, get_old_rcparams
label_desc: Use image node_id 2 for calling the GridPlot obj's underlying member method code with example usage: obj._get_size() and returns: fig_inches, unknown,  unknown