code: def test_map_dict_with_tuple_keys():
      """
      Due to new MultiIndex-ing behaviour in v0.14.0,
      dicts with tuple keys passed to map were being
      converted to a multi-index, preventing tuple values
      from being mapped properly.
      """
      # GH 18496
      df = DataFrame({"a": [(1,), (2,), (3, 4), (5, 6)]})
      label_mappings = {(1,): "A", (2,): "B", (3, 4): "A", (5, 6): "B"}
  
      df["labels"] = df["a"].map(label_mappings)
      df["expected_labels"] = Series(
          ["A", "B", "A", "B"], index=df.index
      )
      # All labels should be filled now
      tm.assert_series_equal(
          df["labels"], df["expected_labels"], check_names=False
      )
  
imports: from collections import Counter, defaultdict
  from decimal import Decimal
  import math
  import numpy
  import pytest
  import pandas
  from pandas import DataFrame, Index, MultiIndex, Series, bdate_range, date_range, isna, timedelta_range
  import pandas._testing
label_desc: Use image node_id 22 for calling a global function with example usage: test_map_dict_with_tuple_keys() without return types