code: def sample_bins_uniformly(y_pred_proba: pd.DataFrame, df_indexes):
      """
      Takes predictive probabilities from y_pred_proba and finds the minimum
      class count then samples minimum class count from every class with
      rows with indexes in df_indexes, where minimum class count is determined
      by dividing y_pred_proba into classes based on their max class predictive prob
      and then each class is counted and the lowest number is the number that is sampled
      from each class.
  
      Parameters:
      y_pred_proba: Predicted probabilities for multi-class problem
      df_indexes: The indices of y_pred_proba should be taken into consideration when
          sampling evenly. These indices should correspond to the indices in
          y_pred_proba.
  
      Returns:
      pd.Series of indices that were selected by sample
      """
      test_pseudo_indices = pd.Series(
          data=False, index=y_pred_proba.index
      )
      if y_pred_proba[df_indexes].empty:
          return test_pseudo_indices
      else:
          pred_idxmax = y_pred_proba[df_indexes].idxmax(axis=1)
          class_value_counts = pred_idxmax.value_counts()
          min_count = class_value_counts.min()
          class_keys = list(class_value_counts.keys())
  
      if len(class_keys) < 1:
          return test_pseudo_indices
  
      logging.log(
          15,
          f"Taking {min_count} rows from the following classes: {class_keys}",
      )
  
      new_test_pseudo_indices = None
      for k in class_keys:
          class_k_pseudo_idxes = pred_idxmax == k
          selected_rows = class_k_pseudo_idxes[
              class_k_pseudo_idxes
          ].sample(min_count)
  
          if new_test_pseudo_indices is None:
              new_test_pseudo_indices = selected_rows.index
          else:
              new_test_pseudo_indices = new_test_pseudo_indices.append(
                  selected_rows.index
              )
  
      test_pseudo_indices.loc[new_test_pseudo_indices] = True
  
      return test_pseudo_indices
  
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 1 for calling a global function with example usage: sample_bins_uniformly(y_pred_proba, df_indexes) and returns: test_pseudo_indices, test_pseudo_indices, test_pseudo_indices