code: def fetch_adult(
      subset="all",
      *,
      data_home=None,
      cache=True,
      binary_race=True,
      usecols=None,
      dropcols=None,
      numeric_only=False,
      dropna=True,
  ):
      """Load the Adult Census Income Dataset.
  
      Binarizes 'race' to 'White' (privileged) or 'Non-white' (unprivileged). The
      other protected attribute is 'sex' ('Male' is privileged and 'Female' is
      unprivileged). The outcome variable is 'annual-income': '>50K' (favorable)
      or '<=50K' (unfavorable).
  
      Note:
          By default, the data is downloaded from OpenML. See the `adult
          <https://www.openml.org/d/1590>`_ page for details.
  
      Args:
          subset ({'train', 'test', or 'all'}, optional): Select the dataset to
              load: 'train' for the training set, 'test' for the test set, 'all'
              for both.
          data_home (string, optional): Specify another download and cache folder
              for the datasets. By default all AIF360 datasets are stored in
              'aif360/sklearn/data/raw' subfolders.
          cache (bool): Whether to cache downloaded datasets.
          binary_race (bool, optional): Group all non-white races together. Only
              the protected attribute is affected, not the feature column, unless
              numeric_only is ``True``.
          usecols (list-like, optional): Feature column(s) to keep. All others are
              dropped.
          dropcols (list-like, optional): Feature column(s) to drop.
          numeric_only (bool): Drop all non-numeric feature columns.
          dropna (bool): Drop rows with NAs.
  
      Returns:
          namedtuple: Tuple containing X, y, and sample_weights for the Adult
          dataset accessible by index or name.
  
      See also:
          :func:`sklearn.datasets.fetch_openml`
  
      Examples:
          >>> adult = fetch_adult()
          >>> adult.X.shape
          (45222, 13)
  
          >>> adult_num = fetch_adult(numeric_only=True)
          >>> adult_num.X.shape
          (48842, 5)
      """
      if subset not in {"train", "test", "all"}:
          raise ValueError(
              "subset must be either 'train', 'test', or 'all'; "
              "cannot be {}".format(subset)
          )
      df = fetch_openml(
          data_id=1590,
          data_home=data_home or DATA_HOME_DEFAULT,
          cache=cache,
          as_frame=True,
      ).frame
      if subset == "train":
          df = df.iloc[16281:]
      elif subset == "test":
          df = df.iloc[:16281]
  
      df = df.rename(
          columns={"class": "annual-income"}
      )  # more descriptive name
      df["annual-income"] = df["annual-income"].cat.reorder_categories(
          ["<=50K", ">50K"], ordered=True
      )
  
      # binarize protected attributes
      race = df.race.cat.set_categories(
          ["Non-white", "White"], ordered=True
      )
      race = race.fillna("Non-white") if binary_race else "race"
      if numeric_only and binary_race:
          df.race = race
          race = "race"
      df.sex = df.sex.cat.reorder_categories(
          ["Female", "Male"], ordered=True
      )
  
      return standardize_dataset(
          df,
          prot_attr=[race, "sex"],
          target="annual-income",
          sample_weight="fnlwgt",
          usecols=usecols,
          dropcols=dropcols,
          numeric_only=numeric_only,
          dropna=dropna,
      )
  
imports: import os
  import pandas
  from sklearn.datasets import fetch_openml
  from aif360.sklearn.datasets.utils import standardize_dataset
label_desc: Use image node_id 1 for calling a global function with example usage: fetch_adult(subset) and returns: standardize_dataset