code: def test_german_matches_old():
      """Tests German Credit datasets matches original version."""
      column_map = {
          "checking_status": "status",
          "duration": "month",
          "savings_status": "savings",
          "installment_commitment": "investment_as_income_percentage",
          "other_parties": "other_debtors",
          "property_magnitude": "property",
          "other_payment_plans": "installment_plans",
          "existing_credits": "number_of_credits",
          "job": "skill_level",
          "num_dependents": "people_liable_for",
          "own_telephone": "telephone",
      }
      X, y = fetch_german()
      # marital status was not included before and age was binary
      X = X.drop(columns=["marital_status", "age"]).reset_index("age")
      # columns are named differently in the old version
      X = X.rename(columns=column_map)
  
      old = GermanDataset()
      old = old.convert_to_dataframe(de_dummy_code=True)[0].drop(
          columns=old.label_names
      )
  
      # categories in the old version were not renamed so just map both to ints
      X = X.apply(
          lambda c: c.factorize()[0] if not is_numeric_dtype(c) else c
      )
      old = old.apply(
          lambda c: c.factorize()[0] if not is_numeric_dtype(c) else c
      )
  
      assert_frame_equal(
          X.reset_index(drop=True),
          old.reset_index(drop=True),
          check_like=True,
      )
  
imports: from functools import partial
  import numpy
  from numpy.testing import assert_array_equal
  import pandas
  from pandas.api.types import is_numeric_dtype
  from pandas.testing import assert_frame_equal
  import pytest
  from sklearn.compose import make_column_transformer
  from sklearn.preprocessing import OneHotEncoder, minmax_scale
  from aif360.datasets import AdultDataset, GermanDataset, CompasDataset, LawSchoolGPADataset, MEPSDataset19, MEPSDataset20, MEPSDataset21
  from aif360.sklearn.datasets import standardize_dataset, NumericConversionWarning, fetch_adult, fetch_bank, fetch_german, fetch_compas, fetch_lawschool_gpa, fetch_meps
label_desc: Use image node_id 13 for calling a global function with example usage: test_german_matches_old() without return types