code: def test_map_callable(datetime_series):
      with np.errstate(all="ignore"):
          tm.assert_series_equal(
              datetime_series.map(np.sqrt), np.sqrt(datetime_series)
          )
  
      # map function element-wise
      tm.assert_series_equal(
          datetime_series.map(math.exp), np.exp(datetime_series)
      )
  
      # empty series
      s = Series(dtype=object, name="foo", index=Index([], name="bar"))
      rs = s.map(lambda x: x)
      tm.assert_series_equal(s, rs)
  
      # check all metadata (GH 9322)
      assert s is not rs
      assert s.index is rs.index
      assert s.dtype == rs.dtype
      assert s.name == rs.name
  
      # index but no data
      s = Series(index=[1, 2, 3], dtype=np.float64)
      rs = s.map(lambda x: x)
      tm.assert_series_equal(s, rs)
  
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 2 for calling a global function with example usage: test_map_callable(datetime_series) without return types