code: def _check_cov_est_function(est):
      """Check covariance estimator function."""
      if isinstance(est, str):
          if est not in cov_est_functions.keys():
              raise ValueError(f"Unknown covariance estimator '{est}'")
          else:
              est = cov_est_functions[est]
      elif not hasattr(est, "__call__"):
          raise ValueError(
              "Covariance estimator must be a function or a string "
              f"(Got {type(est)}."
          )
      return est
  
imports: import warnings
  from functools import wraps
  import numpy
  from scipy.linalg import block_diag
  from scipy.stats import chi2
  from sklearn.covariance import oas, ledoit_wolf, fast_mcd
  from .distance import distance_mahalanobis
  from .test import is_square, is_real_type
label_desc: Use image node_id 11 for calling a global function with example usage: _check_cov_est_function(est) and returns: est