code: def _get_axes(dim, subplots_kwargs=dict()):
      
  
      import matplotlib.pyplot as plt
  
      if dim > 1:
          n_panels = int(dim * (dim - 1) / 2)
      else:
          n_panels = 1
      figsize = subplots_kwargs.pop('figsize', (4*n_panels, 4))
      fig, axes = plt.subplots(1, n_panels, figsize=figsize,
                               **subplots_kwargs)
  
      if n_panels == 1:
          axes = [axes]
  
      else:
          axes = axes.flat
  
      return axes
docs: Parameters
      ----------
      dim : int
          Dimensionality of the orbit.
      subplots_kwargs : dict (optional)
          Dictionary of kwargs passed to :func:`~matplotlib.pyplot.subplots`.