code: def get_financials_time_series(
      self, timescale, keys: list, proxy=None
  ) -> pd.DataFrame:
      timescale_translation = {
          "yearly": "annual",
          "quarterly": "quarterly",
      }
      timescale = timescale_translation[timescale]
  
      # Step 2: construct url:
      ts_url_base = f"https://query2.finance.yahoo.com/ws/fundamentals-timeseries/v1/finance/timeseries/{self._symbol}?symbol={self._symbol}"
      url = (
          ts_url_base
          + "&type="
          + ",".join([timescale + k for k in keys])
      )
      # Yahoo returns maximum 4 years or 5 quarters, regardless of start_dt:
      start_dt = datetime.datetime(2016, 12, 31)
      end = pd.Timestamp.utcnow().ceil("D")
      url += f"&period1={int(start_dt.timestamp())}&period2={int(end.timestamp())}"
  
      # Step 3: fetch and reshape data
      json_str = self._data.cache_get(url=url, proxy=proxy).text
      json_data = json.loads(json_str)
      data_raw = json_data["timeseries"]["result"]
      # data_raw = [v for v in data_raw if len(v) > 1] # Discard keys with no data
      for d in data_raw:
          del d["meta"]
  
      # Now reshape data into a table:
      # Step 1: get columns and index:
      timestamps = set()
      data_unpacked = {}
      for x in data_raw:
          for k in x.keys():
              if k == "timestamp":
                  timestamps.update(x[k])
              else:
                  data_unpacked[k] = x[k]
      timestamps = sorted(list(timestamps))
      dates = pd.to_datetime(timestamps, unit="s")
      df = pd.DataFrame(columns=dates, index=list(data_unpacked.keys()))
      for k, v in data_unpacked.items():
          if df is None:
              df = pd.DataFrame(columns=dates, index=[k])
          df.loc[k] = {
              pd.Timestamp(x["asOfDate"]): x["reportedValue"]["raw"]
              for x in v
          }
  
      df.index = df.index.str.replace("^" + timescale, "", regex=True)
  
      # Reorder table to match order on Yahoo website
      df = df.reindex([k for k in keys if k in df.index])
      df = df[sorted(df.columns, reverse=True)]
  
      return df
  
file_path: yfinance/yfinance/scrapers/fundamentals.py
imports: import datetime
  import json
  import pandas
  from yfinance import utils, const
  from yfinance.data import YfData
  from yfinance.exceptions import YFinanceException, YFNotImplementedError
label_desc: Use image node_id 7 for calling the Financials obj's underlying member method code with example usage: obj.get_financials_time_series(timescale, keys, proxy) and returns: df