code: def filter_ensemble_pseudo(
      predictor, unlabeled_data: pd.DataFrame, num_models: int = 5
  ):
      """
      Uses top num_models to predict on unlabeled data then filters the ensemble model
      predicted data and returns indices of row that meet a metric. If problem is multiclass
      or binary, will take top num_models predictive probabilities for unlabeled data then
      averages them and selects row with max predictive probability above a threshold. For
      regression, will take top num_models and calculate the variance in their predictions
      and select the rows with the least variance among all model predictions.
  
      Parameters:
      -----------
      predictor: Fitted TabularPredictor
      unlabeled_data: Unlabeled data for top k models to predict on
      num_models: Number of top models to ensemble
  
      Returns:
      -------
      pd.Series of indices that met pseudo labeling requirements
      """
      original_k = num_models
      leaderboard = predictor._trainer.leaderboard()
      num_models = len(leaderboard)
  
      if num_models < 2:
          raise Exception(
              "Ensemble pseudo labeling was enabled, but only one model was trained"
          )
  
      if num_models != num_models:
          logging.warning(
              f"Ensemble pseudo labeling expected {original_k}, but only {num_models} fit."
          )
  
      if predictor.problem_type in PROBLEM_TYPES_CLASSIFICATION:
          return filter_ensemble_classification(
              predictor=predictor,
              unlabeled_data=unlabeled_data,
              leaderboard=leaderboard,
              num_models=num_models,
          )
      else:
          return filter_pseudo_std_regression(
              predictor=predictor,
              unlabeled_data=unlabeled_data,
              leaderboard=leaderboard,
              num_models=num_models,
          )
  
file_path: autogluon/core/src/autogluon/core/pseudolabeling/pseudolabeling.py
imports: import logging
  import numpy
  import pandas
  from autogluon.core.constants import PROBLEM_TYPES_CLASSIFICATION
label_desc: Use image node_id 3 for calling a global function with example usage: filter_ensemble_pseudo(predictor, unlabeled_data, num_models) and returns: filter_ensemble_classification, filter_pseudo_std_regression