code: def backtest_loop(
      start_time: Union[pd.Timestamp, str],
      end_time: Union[pd.Timestamp, str],
      trade_strategy: BaseStrategy,
      trade_executor: BaseExecutor,
  ) -> Tuple[PORT_METRIC, INDICATOR_METRIC]:
      """backtest function for the interaction of the outermost strategy and executor in the nested decision execution
  
      please refer to the docs of `collect_data_loop`
  
      Returns
      -------
      portfolio_dict: PORT_METRIC
          it records the trading portfolio_metrics information
      indicator_dict: INDICATOR_METRIC
          it computes the trading indicator
      """
      return_value: dict = {}
      for _decision in collect_data_loop(
          start_time,
          end_time,
          trade_strategy,
          trade_executor,
          return_value,
      ):
          pass
  
      portfolio_dict = cast(
          PORT_METRIC, return_value.get("portfolio_dict")
      )
      indicator_dict = cast(
          INDICATOR_METRIC, return_value.get("indicator_dict")
      )
  
      return portfolio_dict, indicator_dict
  
file_path: qlib/qlib/backtest/backtest.py
imports: from __future__ import annotations
  from typing import Dict, TYPE_CHECKING, Generator, Optional, Tuple, Union, cast
  import pandas
  from qlib.backtest.decision import BaseTradeDecision
  from qlib.backtest.report import Indicator
  from tqdm.auto import tqdm
  from ..utils.time import Freq
label_desc: Use image node_id 1 for calling a global function with example usage: backtest_loop(start_time, end_time, trade_strategy, trade_executor) and returns: portfolio_dict,  indicator_dict