code: def _validate_n_components(self, n_components, n_samples, n_features):
      if n_components == "mle":
          if n_samples < n_features:
              raise ValueError(
                  "n_components='mle' is only supported "
                  "if n_samples >= n_features"
              )
      elif not 0 <= n_components <= min(n_samples, n_features):
          raise ValueError(
              "n_components=%r must be between 0 and "
              "min(n_samples, n_features)=%r with "
              "svd_solver='full'"
              % (n_components, min(n_samples, n_features))
          )
      elif n_components >= 1:
          if not isinstance(n_components, numbers.Integral):
              raise ValueError(
                  "n_components=%r must be of type int "
                  "when greater than or equal to 1, "
                  "was of type=%r" % (n_components, type(n_components))
              )
  
file_path: scikit-learn-intelex/daal4py/sklearn/decomposition/_pca.py
imports: import numbers
  from math import sqrt
  import numpy
  from scipy.sparse import issparse
  from sklearn.utils import check_array
  from sklearn.utils.extmath import stable_cumsum
  from sklearn.utils.validation import check_is_fitted
  import daal4py
  from .._device_offload import support_usm_ndarray
  from .._utils import PatchingConditionsChain, control_n_jobs, getFPType, run_with_n_jobs, sklearn_check_version
label_desc: Use image node_id 2 for calling the PCA obj's underlying member method code with example usage: obj._validate_n_components(n_components, n_samples, n_features) without return types