code: def _condition_outliers_number(
      quantiles_vector: np.ndarray,
      outlier_score_threshold: float,
      max_outliers_ratio: float = 0,
  ):
      max_outliers_ratio = max(round(max_outliers_ratio, 3), 0.001)
      score_at_max_outliers_ratio = quantiles_vector[
          int(1000 - max_outliers_ratio * 1000)
      ]
      category = (
          ConditionCategory.WARN
          if score_at_max_outliers_ratio > outlier_score_threshold
          else ConditionCategory.PASS
      )
  
      quantiles_above_threshold = (
          quantiles_vector > outlier_score_threshold
      )
      if quantiles_above_threshold.any():
          ratio_above_threshold = round(
              (1000 - np.argmax(quantiles_above_threshold)) / 1000, 3
          )
      else:
          ratio_above_threshold = 0
      details = f"{format_percent(ratio_above_threshold)} of dataset samples above outlier threshold"
  
      return ConditionResult(category, details)
  
file_path: deepchecks/deepchecks/tabular/checks/data_integrity/outlier_sample_detection.py
imports: import time
  from typing import List, Union
  import numpy
  from PyNomaly import loop
  from deepchecks.core import CheckResult, ConditionCategory, ConditionResult
  from deepchecks.core.errors import DeepchecksProcessError, DeepchecksTimeoutError, DeepchecksValueError, NotEnoughSamplesError
  from deepchecks.tabular import Context, SingleDatasetCheck
  from deepchecks.utils import gower_distance
  from deepchecks.utils.dataframes import select_from_dataframe
  from deepchecks.utils.strings import format_number, format_percent
  from deepchecks.utils.typing import Hashable
label_desc: Use image node_id 1 for calling a global function with example usage: _condition_outliers_number(quantiles_vector, outlier_score_threshold, max_outliers_ratio) and returns: ConditionResult