class_docstr: Base executor for trading
docstr: execute the trade decision and return the executed result
  
  NOTE: this function is never used directly in the framework. Should we delete it?
  
  Parameters
  ----------
  trade_decision : BaseTradeDecision
  
  level : int
      the level of current executor
  
  Returns
  ----------
  execute_result : List[object]
      the executed result for trade decision
docstr_tok: ["execute","the","trade","decision","and","return","the","executed","result","NOTE",":","this","function","is","never","used","directly","in","the","framework",".","Should","we","delete","it","?","Parameters","--","--","--","--","--","trade_decision",":","BaseTradeDecision","level",":","int","the","level","of","current","executor","Returns","--","--","--","--","--","execute_result",":","List","[","object","]","the","executed","result","for","trade","decision"]
code: def execute(
      self, trade_decision: BaseTradeDecision, level: int = 0
  ) -> List[object]:
      """execute the trade decision and return the executed result
  
      NOTE: this function is never used directly in the framework. Should we delete it?
  
      Parameters
      ----------
      trade_decision : BaseTradeDecision
  
      level : int
          the level of current executor
  
      Returns
      ----------
      execute_result : List[object]
          the executed result for trade decision
      """
      return_value: dict = {}
      for _decision in self.collect_data(
          trade_decision, return_value=return_value, level=level
      ):
          pass
      return cast(list, return_value.get("execute_result"))
  
imports: from __future__ import annotations
  import copy
  from abc import abstractmethod
  from collections import defaultdict
  from types import GeneratorType
  from typing import Any, Dict, Generator, List, Tuple, Union, cast
  import pandas
  from qlib.backtest.account import Account
  from qlib.backtest.position import BasePosition
  from qlib.log import get_module_logger
  from ..strategy.base import BaseStrategy
  from ..utils import init_instance_by_config
  from .decision import BaseTradeDecision, Order
  from .exchange import Exchange
  from .utils import CommonInfrastructure, LevelInfrastructure, TradeCalendarManager, get_start_end_idx
label_desc: Use image node_id 8 for calling the BaseExecutor obj's underlying member method code with example usage: obj.execute(trade_decision, level) and returns: cast