code: def test_constrained_layout():
      """Test that we handle constrained layouts correctly."""
      fig, ax = plt.subplots(1, 1, layout="constrained")
      assert fig.get_constrained_layout()
      evoked = mne.read_evokeds(evoked_fname)[0]
      evoked.pick(evoked.ch_names[:2])
  
      # smoke test that it does not break things
      evoked.plot(axes=ax)
      assert fig.get_constrained_layout()
      plt.close("all")
  
imports: from pathlib import Path
  import matplotlib.pyplot
  import numpy
  import pytest
  from matplotlib import gridspec
  from matplotlib.collections import PolyCollection
  from matplotlib.colors import same_color
  from mpl_toolkits.axes_grid1.parasite_axes import HostAxes
  from numpy.testing import assert_allclose
  import mne
  from mne import Epochs, compute_covariance, compute_proj_evoked, make_fixed_length_events, read_cov, read_events
  from mne._fiff.constants import FIFF
  from mne.datasets import testing
  from mne.io import read_raw_fif
  from mne.stats.parametric import _parametric_ci
  from mne.utils import catch_logging
  from mne.viz import plot_compare_evokeds, plot_evoked_white
  from mne.viz.utils import _fake_click, _get_cmap
label_desc: Use image node_id 5 for calling a global function with example usage: test_constrained_layout() without return types