code: def assert_power_preserved(orig, new, limits=(1.0, 1.05)):
      """Assert that the power is preserved during a round-trip morph."""
      __tracebackhide__ = True
      for kind in ("real", "imag"):
          numer = np.linalg.norm(getattr(orig.data, kind))
          denom = np.linalg.norm(getattr(new.data, kind))
          if numer == denom == 0.0:  # no data of this type
              continue
          power_ratio = numer / denom
          min_, max_ = limits
          assert (
              min_ < power_ratio < max_
          ), f"Power ratio {kind} = {power_ratio}"
  
imports: from inspect import signature
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_equal, assert_array_less
  from scipy.sparse import csr_matrix
  from scipy.sparse import eye
  from scipy.spatial.distance import cdist
  import mne
  from mne import SourceEstimate, SourceMorph, VectorSourceEstimate, VolSourceEstimate, VolVectorSourceEstimate, compute_source_morph, get_volume_labels_from_aseg, grade_to_vertices, make_ad_hoc_cov, make_forward_solution, make_sphere_model, read_evokeds, read_forward_solution, read_freesurfer_lut, read_source_estimate, read_source_morph, setup_volume_source_space
  from mne._freesurfer import _get_atlas_values, _get_mri_info_data
  from mne.datasets import testing
  from mne.fixes import _get_img_fdata
  from mne.minimum_norm import apply_inverse, make_inverse_operator, read_inverse_operator
  from mne.source_space._source_space import _add_interpolator, _grid_interp
  from mne.transforms import quat_to_rot
  from mne.utils import _record_warnings, catch_logging
label_desc: Use image node_id 7 for calling a global function with example usage: assert_power_preserved(orig, new, limits) without return types