code: def _load_all_models(patched):
      if patched:
          patch_sklearn()
  
      models = []
      for patch_infos in get_patch_map().values():
          maybe_class = getattr(
              patch_infos[0][0][0], patch_infos[0][0][1]
          )
          if (
              maybe_class is not None
              and isclass(maybe_class)
              and issubclass(maybe_class, BaseEstimator)
          ):
              models.append(maybe_class())
  
      if patched:
          unpatch_sklearn()
  
      return models
  
file_path: scikit-learn-intelex/sklearnex/tests/test_patching.py
imports: import os
  import pathlib
  import re
  import subprocess
  import sys
  from inspect import isclass
  import pytest
  from _models_info import TO_SKIP
  from sklearn.base import BaseEstimator
  from sklearnex import get_patch_map, is_patched_instance, patch_sklearn, unpatch_sklearn
label_desc: Use image node_id 5 for calling a global function with example usage: _load_all_models(patched) and returns: models