code: def test_get_loc_masked(
      self, val, val2, any_numeric_ea_and_arrow_dtype
  ):
      # GH#39133
      idx = Index(
          [1, 2, 3, val, val2], dtype=any_numeric_ea_and_arrow_dtype
      )
      result = idx.get_loc(2)
      assert result == 1
  
      with pytest.raises(KeyError, match="9"):
          idx.get_loc(9)
  
imports: import numpy
  import pytest
  from pandas.errors import InvalidIndexError
  from pandas import NA, Index, RangeIndex, Series, Timestamp
  import pandas._testing
  from pandas.core.arrays import ArrowExtensionArray, FloatingArray
label_desc: Use image node_id 15 for calling the TestGetIndexer obj's underlying member method code with example usage: obj.test_get_loc_masked(val, val2, any_numeric_ea_and_arrow_dtype) without return types