code: def test_repair_100x_block_daily(self):
      # Some 100x errors are not sporadic.
      # Sometimes Yahoo suddenly shifts from cents->$ from some recent date.
  
      tkrs = ["AET.L", "SSW.JO"]
      for tkr in tkrs:
          for interval in ["1d", "1wk"]:
              dat = yf.Ticker(tkr, session=self.session)
              tz_exchange = dat.fast_info["timezone"]
  
              data_cols = ["Low", "High", "Open", "Close", "Adj Close"]
              _dp = os.path.dirname(__file__)
              fp = os.path.join(
                  _dp,
                  "data",
                  tkr.replace(".", "-")
                  + "-"
                  + interval
                  + "-100x-error.csv",
              )
              if not os.path.isfile(fp):
                  continue
              df_bad = _pd.read_csv(fp, index_col="Date")
              df_bad.index = _pd.to_datetime(
                  df_bad.index, utc=True
              ).tz_convert(tz_exchange)
              df_bad = df_bad.sort_index()
  
              df = df_bad.copy()
              fp = os.path.join(
                  _dp,
                  "data",
                  tkr.replace(".", "-")
                  + "-"
                  + interval
                  + "-100x-error-fixed.csv",
              )
              df = _pd.read_csv(fp, index_col="Date")
              df.index = _pd.to_datetime(df.index, utc=True).tz_convert(
                  tz_exchange
              )
              df = df.sort_index()
  
              df_repaired = dat._fix_unit_switch(
                  df_bad, interval, tz_exchange
              )
              df_repaired = df_repaired.sort_index()
  
              # First test - no errors left
              for c in data_cols:
                  try:
                      self.assertTrue(
                          _np.isclose(
                              df_repaired[c], df[c], rtol=1e-2
                          ).all()
                      )
                  except:
                      print("- repaired:")
                      print(df_repaired[c])
                      print("- correct:")
                      print(df[c])
                      print(
                          f"TEST FAIL on column '{c}' (tkr={tkr} interval={interval})"
                      )
                      raise
  
              # Second test - all differences should be either ~1x or ~100x
              ratio = df_bad[data_cols].values / df[data_cols].values
              ratio = ratio.round(2)
              # - round near-100 ratio to 100:
              f = ratio > 90
              ratio[f] = (ratio[f] / 10).round().astype(
                  int
              ) * 10  # round ratio to nearest 10
              # - now test
              f_100 = (ratio == 100) | (ratio == 0.01)
              f_1 = ratio == 1
              self.assertTrue((f_100 | f_1).all())
  
              self.assertTrue("Repaired?" in df_repaired.columns)
              self.assertFalse(df_repaired["Repaired?"].isna().any())
  
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 7 for calling the TestPriceRepair obj's underlying member method code with example usage: obj.test_repair_100x_block_daily() without return types