code: def test_map_dict_subclass_with_missing():
      """
      Test Series.map with a dictionary subclass that defines __missing__,
      i.e. sets a default value (GH #15999).
      """
  
      class DictWithMissing(dict):
          def __missing__(self, key):
              return "missing"
  
      s = Series([1, 2, 3])
      dictionary = DictWithMissing({3: "three"})
      result = s.map(dictionary)
      expected = Series(["missing", "missing", "three"])
      tm.assert_series_equal(result, expected)
  
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 32 for calling a global function with example usage: test_map_dict_subclass_with_missing() and returns: str