code: def test_skip_nested_validation(prefer_skip_nested_validation):
      """Check that nested validation can be skipped."""
  
      @validate_params({"a": [int]}, prefer_skip_nested_validation=True)
      def f(a):
          pass
  
      @validate_params(
          {"b": [int]},
          prefer_skip_nested_validation=prefer_skip_nested_validation,
      )
      def g(b):
          # calls f with a bad parameter type
          return f(a="invalid_param_value")
  
      # Validation for g is never skipped.
      with pytest.raises(
          InvalidParameterError, match="The 'b' parameter"
      ):
          g(b="invalid_param_value")
  
      if prefer_skip_nested_validation:
          g(b=1)  # does not raise because inner f is not validated
      else:
          with pytest.raises(
              InvalidParameterError, match="The 'a' parameter"
          ):
              g(b=1)
  
imports: from numbers import Integral, Real
  import numpy
  import pytest
  from scipy.sparse import csr_matrix
  from sklearn._config import config_context, get_config
  from sklearn.base import BaseEstimator, _fit_context
  from sklearn.model_selection import LeaveOneOut
  from sklearn.utils import deprecated
  from sklearn.utils._param_validation import HasMethods, Hidden, Interval, InvalidParameterError, MissingValues, Options, RealNotInt, StrOptions, _ArrayLikes, _Booleans, _Callables, _CVObjects, _InstancesOf, _IterablesNotString, _NanConstraint, _NoneConstraint, _PandasNAConstraint, _RandomStates, _SparseMatrices, _VerboseHelper, generate_invalid_param_val, generate_valid_param, make_constraint, validate_params
label_desc: Use image node_id 36 for calling a global function with example usage: test_skip_nested_validation(prefer_skip_nested_validation) and returns: f