code: def test_check_embedded_masker_defaults():
      dummy = DummyEstimator(memory=None, memory_level=1)
      with pytest.warns(
          Warning,
          match="Provided estimator has no verbose attribute set.",
      ):
          dummy.fit()
      assert dummy.masker.memory_level == 0
      assert dummy.masker.verbose == 0
      dummy = DummyEstimator(verbose=1)
      with pytest.warns(
          Warning,
          match="Provided estimator has no memory attribute set.",
      ):
          dummy.fit()
      assert isinstance(dummy.masker.memory, Memory)
      assert dummy.masker.memory.location is None
      assert dummy.masker.memory_level == 0
      assert dummy.masker.verbose == 1
  
file_path: nilearn/nilearn/_utils/tests/test_masker_validation.py
imports: import nibabel
  import numpy
  import pytest
  from joblib import Memory
  from sklearn.base import BaseEstimator
  from nilearn._utils.masker_validation import check_embedded_masker
  from nilearn.experimental.surface import SurfaceMasker
  from nilearn.maskers import MultiNiftiMasker, NiftiMasker
label_desc: Use image node_id 1 for calling a global function with example usage: test_check_embedded_masker_defaults() without return types