class_docstr: Base class for KMeans and MiniBatchKMeans
class_docstr_tok: ["Base","class","for","KMeans","and","MiniBatchKMeans"]
docstr: Check when vcomp and mkl are both present
docstr_tok: ["Check","when","vcomp","and","mkl","are","both","present"]
code: def _check_mkl_vcomp(self, X, n_samples):
      """Check when vcomp and mkl are both present"""
      # The BLAS call inside a prange in lloyd_iter_chunked_dense is known to
      # cause a small memory leak when there are less chunks than the number
      # of available threads. It only happens when the OpenMP library is
      # vcomp (microsoft OpenMP) and the BLAS library is MKL. see #18653
      if sp.issparse(X):
          return
  
      n_active_threads = int(np.ceil(n_samples / CHUNK_SIZE))
      if n_active_threads < self._n_threads:
          modules = threadpool_info()
          has_vcomp = "vcomp" in [
              module["prefix"] for module in modules
          ]
          has_mkl = ("mkl", "intel") in [
              (
                  module["internal_api"],
                  module.get("threading_layer", None),
              )
              for module in modules
          ]
          if has_vcomp and has_mkl:
              self._warn_mkl_vcomp(n_active_threads)
  
imports: import warnings
  from abc import ABC, abstractmethod
  from numbers import Integral, Real
  import numpy
  import scipy.sparse
  from ..base import BaseEstimator, ClassNamePrefixFeaturesOutMixin, ClusterMixin, TransformerMixin, _fit_context
  from ..exceptions import ConvergenceWarning
  from ..metrics.pairwise import _euclidean_distances, euclidean_distances
  from ..utils import check_array, check_random_state
  from ..utils._openmp_helpers import _openmp_effective_n_threads
  from ..utils._param_validation import Interval, StrOptions, validate_params
  from ..utils.extmath import row_norms, stable_cumsum
  from ..utils.fixes import threadpool_info, threadpool_limits
  from ..utils.sparsefuncs import mean_variance_axis
  from ..utils.sparsefuncs_fast import assign_rows_csr
  from ..utils.validation import _check_sample_weight, _is_arraylike_not_scalar, check_is_fitted
  from ._k_means_common import CHUNK_SIZE, _inertia_dense, _inertia_sparse, _is_same_clustering
  from ._k_means_elkan import elkan_iter_chunked_dense, elkan_iter_chunked_sparse, init_bounds_dense, init_bounds_sparse
  from ._k_means_lloyd import lloyd_iter_chunked_dense, lloyd_iter_chunked_sparse
  from ._k_means_minibatch import _minibatch_update_dense, _minibatch_update_sparse
label_desc: Use image node_id 4 for calling the _BaseKMeans obj's underlying member method code with example usage: obj._check_mkl_vcomp(X, n_samples) without return types