code: def test_loc_with_scalar(
      self, series_with_interval_index, indexer_sl
  ):
      # loc with single label / list of labels:
      #   - Intervals: only exact matches
      #   - scalars: those that contain it
  
      ser = series_with_interval_index.copy()
  
      assert indexer_sl(ser)[1] == 0
      assert indexer_sl(ser)[1.5] == 1
      assert indexer_sl(ser)[2] == 1
  
      expected = ser.iloc[1:4]
      tm.assert_series_equal(expected, indexer_sl(ser)[[1.5, 2.5, 3.5]])
      tm.assert_series_equal(expected, indexer_sl(ser)[[2, 3, 4]])
      tm.assert_series_equal(expected, indexer_sl(ser)[[1.5, 3, 4]])
  
      expected = ser.iloc[[1, 1, 2, 1]]
      tm.assert_series_equal(
          expected, indexer_sl(ser)[[1.5, 2, 2.5, 1.5]]
      )
  
      expected = ser.iloc[2:5]
      tm.assert_series_equal(expected, indexer_sl(ser)[ser >= 2])
  
file_path: pandas/pandas/tests/indexing/interval/test_interval_new.py
imports: import re
  import numpy
  import pytest
  from pandas.compat import IS64
  from pandas import Index, Interval, IntervalIndex, Series
  import pandas._testing
label_desc: Use image node_id 3 for calling the TestIntervalIndex obj's underlying member method code with example usage: obj.test_loc_with_scalar(series_with_interval_index, indexer_sl) without return types