code: def test_partial_slice_daily(self):
      rng = date_range(
          freq="h", start=datetime(2005, 1, 31), periods=500
      )
      s = Series(np.arange(len(rng)), index=rng)
  
      result = s["2005-1-31"]
      tm.assert_series_equal(result, s.iloc[:24])
  
      with pytest.raises(KeyError, match=r"^'2004-12-31 00'$"):
          s["2004-12-31 00"]
  
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 11 for calling the TestSlicing obj's underlying member method code with example usage: obj.test_partial_slice_daily() without return types