code: def test_get_with_default():
      # GH#7725
      d0 = ["a", "b", "c", "d"]
      d1 = np.arange(4, dtype="int64")
  
      for data, index in ((d0, d1), (d1, d0)):
          s = Series(data, index=index)
          for i, d in zip(index, data):
              assert s.get(i) == d
              assert s.get(i, d) == d
              assert s.get(i, "z") == d
  
              assert s.get("e", "z") == "z"
              assert s.get("e", "e") == "e"
  
              msg = "Series.__getitem__ treating keys as positions is deprecated"
              warn = None
              if index is d0:
                  warn = FutureWarning
              with tm.assert_produces_warning(warn, match=msg):
                  assert s.get(10, "z") == "z"
                  assert s.get(10, 10) == 10
  
file_path: pandas/pandas/tests/series/indexing/test_get.py
imports: import numpy
  import pytest
  import pandas
  from pandas import DatetimeIndex, Index, Series, date_range
  import pandas._testing
label_desc: Use image node_id 4 for calling a global function with example usage: test_get_with_default() without return types