code: def test_partial_slice_requires_monotonicity(self):
      # Disallowed since 2.0 (GH 37819)
      ser = Series(np.arange(10), date_range("2014-01-01", periods=10))
  
      nonmonotonic = ser.iloc[[3, 5, 4]]
      timestamp = Timestamp("2014-01-10")
      with pytest.raises(
          KeyError, match="Value based partial slicing on non-monotonic"
      ):
          nonmonotonic["2014-01-10":]
  
      with pytest.raises(
          KeyError, match=r"Timestamp\('2014-01-10 00:00:00'\)"
      ):
          nonmonotonic[timestamp:]
  
      with pytest.raises(
          KeyError, match="Value based partial slicing on non-monotonic"
      ):
          nonmonotonic.loc["2014-01-10":]
  
      with pytest.raises(
          KeyError, match=r"Timestamp\('2014-01-10 00:00:00'\)"
      ):
          nonmonotonic.loc[timestamp:]
  
imports: from datetime import datetime
  import numpy
  import pytest
  from pandas import DataFrame, DatetimeIndex, Index, MultiIndex, Series, Timedelta, Timestamp, date_range
  import pandas._testing
label_desc: Use image node_id 18 for calling the TestSlicing obj's underlying member method code with example usage: obj.test_partial_slice_requires_monotonicity() without return types