code: def dataset_wrapper(
      outcome,
      protected,
      unprivileged_groups,
      privileged_groups,
      favorable_label,
      unfavorable_label,
  ):
      """A wrapper function to create aif360 dataset from outcome and protected in numpy array format."""
      df = pd.DataFrame(data=outcome, columns=["outcome"])
      df["race"] = protected
  
      dataset = BinaryLabelDataset(
          favorable_label=favorable_label,
          unfavorable_label=unfavorable_label,
          df=df,
          label_names=["outcome"],
          protected_attribute_names=["race"],
          unprivileged_protected_attributes=unprivileged_groups,
      )
      return dataset
  
file_path: AIF360/mlops/kubeflow/bias_detector_pytorch/src/fairness.py
imports: import os
  from aif360.datasets import BinaryLabelDataset
  from aif360.metrics import ClassificationMetric
  import numpy
  import argparse
  import pandas
  from minio import Minio
  import json
  import zipfile
  import importlib
  import re
  import torch
  import torch.utils.data
  from torch.autograd import Variable
label_desc: Use image node_id 1 for calling a global function with example usage: dataset_wrapper(outcome, protected, unprivileged_groups, privileged_groups, favorable_label, unfavorable_label) and returns: dataset