code: def test_shadow_model_default_randomisation(art_warning):
      try:
          (x_train, y_train), (_, _), _, _ = load_nursery(test_set=0.2)
  
          model = RandomForestClassifier(random_state=7)
          model.fit(x_train, y_train)
          art_classifier = ScikitlearnRandomForestClassifier(model)
  
          shadow_models = ShadowModels(
              art_classifier, num_shadow_models=1, random_state=7
          )
  
          shadow_dataset = (
              shadow_models.generate_synthetic_shadow_dataset(
                  art_classifier,
                  dataset_size=40,
                  max_features_randomized=8,
                  min_confidence=0.2,
                  max_retries=15,
                  random_record_fn=None,
                  randomize_features_fn=None,
              )
          )
          (mem_x, mem_y, mem_pred), (
              nonmem_x,
              nonmem_y,
              nonmem_pred,
          ) = shadow_dataset
  
          assert len(mem_x) == len(mem_y)
          assert len(mem_y) == len(mem_pred)
          assert len(nonmem_x) == len(nonmem_y)
          assert len(nonmem_y) == len(nonmem_pred)
          assert len(mem_x) + len(mem_y) == 40
  
      except ARTTestException as e:
          art_warning(e)
  
file_path: adversarial-robustness-toolbox/tests/attacks/inference/membership_inference/test_shadow_models.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import numpy
  import pytest
  from sklearn.ensemble import RandomForestClassifier
  from art.attacks.inference.membership_inference.black_box import MembershipInferenceBlackBox
  from art.attacks.inference.membership_inference.shadow_models import ShadowModels
  from art.estimators.classification.scikitlearn import ScikitlearnRandomForestClassifier, ScikitlearnClassifier
  from art.utils import load_nursery, to_categorical
  from tests.utils import ARTTestException
label_desc: Use image node_id 5 for calling a global function with example usage: test_shadow_model_default_randomisation(art_warning) without return types