docs: def plot_transforms(ace_model, fname='ace_transforms.png'):
      """Plot the transforms."""
      if not plt:
          raise ImportError('Cannot plot without the matplotlib package')
      plt.rcParams.update({'font.size': 8})
      plt.figure()
      num_cols = len(ace_model.x) / 2 + 1
      for i in range(len(ace_model.x)):
          plt.subplot(num_cols, 2, i + 1)
          plt.plot(ace_model.x[i], ace_model.x_transforms[i], '.', label='Phi {0}'.format(i))
          plt.xlabel('x{0}'.format(i))
          plt.ylabel('phi{0}'.format(i))
      plt.subplot(num_cols, 2, i + 2)  # pylint: disable=undefined-loop-variable
      plt.plot(ace_model.y, ace_model.y_transform, '.', label='Theta')
      plt.xlabel('y')
      plt.ylabel('theta')
      plt.tight_layout()
  
      if fname:
          plt.savefig(fname)
          return None
      return plt