code: def test_prune_post_intraday_us(self):
      # Half-day at USA Thanksgiving. Yahoo normally
      # returns an interval starting when regular trading closes,
      # even if prepost=False.
  
      # Setup
      tkr = "AMZN"
      special_day = _dt.date(2023, 11, 24)
      time_early_close = _dt.time(13)
      dat = yf.Ticker(tkr, session=self.session)
  
      # Run
      start_d = special_day - _dt.timedelta(days=7)
      end_d = special_day + _dt.timedelta(days=7)
      df = dat.history(
          start=start_d,
          end=end_d,
          interval="1h",
          prepost=False,
          keepna=True,
      )
      tg_last_dt = df.loc[str(special_day)].index[-1]
      self.assertTrue(tg_last_dt.time() < time_early_close)
  
      # Test no other afternoons (or mornings) were pruned
      start_d = _dt.date(special_day.year, 1, 1)
      end_d = _dt.date(special_day.year + 1, 1, 1)
      df = dat.history(
          start=start_d,
          end=end_d,
          interval="1h",
          prepost=False,
          keepna=True,
      )
      last_dts = _pd.Series(df.index).groupby(df.index.date).last()
      dfd = dat.history(
          start=start_d,
          end=end_d,
          interval="1d",
          prepost=False,
          keepna=True,
      )
      self.assertTrue(
          _np.equal(
              dfd.index.date, _pd.to_datetime(last_dts.index).date
          ).all()
      )
  
imports: from .context import yfinance
  from .context import session_gbl
  import unittest
  import os
  import datetime
  import pytz
  import numpy
  import pandas
label_desc: Use image node_id 20 for calling the TestPriceHistory obj's underlying member method code with example usage: obj.test_prune_post_intraday_us() without return types