code: def _allow_exception(func, exception):
      def f(*args, **kwargs):
          try:
              func(*args, **kwargs)
          except exception:
              pass
  
      f.__name__ = func.__name__
      return f
  
file_path: river/river/checks/__init__.py
imports: from __future__ import annotations
  import functools
  import typing
  import numpy
  from river.base import Estimator
  from river.model_selection.base import ModelSelector
  from river.reco.base import Ranker
  from .None import anomaly, clf, common, model_selection, reco
label_desc: Use image node_id 1 for calling a global function with example usage: _allow_exception(func, exception) and returns: f