code: def test_map_category():
      # GH 10324
      a = Series([1, 2, 3, 4])
      b = Series(["even", "odd", "even", "odd"], dtype="category")
      c = Series(["even", "odd", "even", "odd"])
  
      exp = Series(["odd", "even", "odd", np.nan], dtype="category")
      tm.assert_series_equal(a.map(b), exp)
      exp = Series(["odd", "even", "odd", np.nan])
      tm.assert_series_equal(a.map(c), exp)
  
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 13 for calling a global function with example usage: test_map_category() without return types