code: def test_partial_getitem_loc_datetime(
      self, indexer, exp_idx, exp_values
  ):
      # GH: 25165
      date_idx = date_range("2019", periods=2, freq="MS")
      df = DataFrame(
          list(range(4)),
          index=MultiIndex.from_product(
              [date_idx, [0, 1]], names=["x", "y"]
          ),
      )
      expected = DataFrame(
          exp_values,
          index=MultiIndex.from_product(
              [exp_idx, [0, 1]], names=["x", "y"]
          ),
      )
      result = df[indexer]
      tm.assert_frame_equal(result, expected)
      result = df.loc[indexer]
      tm.assert_frame_equal(result, expected)
  
      result = df.loc(axis=0)[indexer]
      tm.assert_frame_equal(result, expected)
  
      result = df.loc[indexer, :]
      tm.assert_frame_equal(result, expected)
  
      df2 = df.swaplevel(0, 1).sort_index()
      expected = expected.swaplevel(0, 1).sort_index()
  
      result = df2.loc[:, indexer, :]
      tm.assert_frame_equal(result, expected)
  
file_path: pandas/pandas/tests/indexing/multiindex/test_partial.py
imports: import numpy
  import pytest
  from pandas import DataFrame, DatetimeIndex, MultiIndex, date_range
  import pandas._testing
label_desc: Use image node_id 10 for calling the TestMultiIndexPartial obj's underlying member method code with example usage: obj.test_partial_getitem_loc_datetime(indexer, exp_idx, exp_values) without return types