code: def test_get_complex(idx, exp):
      # GH 20671, getting value not in dict raising `KeyError`
      ser = Series(
          [(1, 2, 3), [1, 2, 3], {1, 2, 3}, {1: "a", 2: "b", 3: "c"}]
      )
  
      result = ser.str.get(idx)
      expected = Series(exp)
      tm.assert_series_equal(result, expected)
  
imports: from datetime import datetime
  import re
  import numpy
  import pytest
  import pandas
  from pandas import DataFrame, Index, MultiIndex, Series, _testing
  from pandas.tests.strings import _convert_na_value, object_pyarrow_numpy
label_desc: Use image node_id 47 for calling a global function with example usage: test_get_complex(idx, exp) without return types