code: def disable_numba():
      """
      Forces numba to use the original python functions.
  
      This is required as numba code in pyod (anomaly) seems to not work
      correctly leading to exceptions if ran from within pytest.
      """
      old = numba.config.DISABLE_JIT
      # This will not affect already compiled functions...
      numba.config.DISABLE_JIT = True
  
      # ...which is why we force the Numba dispatcher to simply
      # call the underlying python function for already compiled
      # ones
      def pyfunc_call(self, *args, **kwargs):
          return self.py_func(*args, **kwargs)
  
      with patch.object(Dispatcher, "__call__", pyfunc_call):
          yield
      numba.config.DISABLE_JIT = old
  
file_path: pycaret/tests/test_models.py
imports: from unittest.mock import patch
  import numba
  import pytest
  from numba.core.dispatcher import Dispatcher
  import pycaret.datasets
  from pycaret.anomaly import AnomalyExperiment
  from pycaret.classification import ClassificationExperiment
  from pycaret.clustering import ClusteringExperiment
  from pycaret.regression import RegressionExperiment
  from pycaret.time_series import TSForecastingExperiment
label_desc: Use image node_id 1 for calling a global function with example usage: disable_numba() and returns: self