class_docstr: Trade decisions are made by strategy and executed by executor
  
  Motivation:
      Here are several typical scenarios for `BaseTradeDecision`
  
      Case 1:
      1. Outer strategy makes a decision. The decision is not available at the start of current interval
      2. After a period of time, the decision are updated and become available
      3. The inner strategy try to get the decision and start to execute the decision according to `get_range_limit`
      Case 2:
      1. The outer strategy's decision is available at the start of the interval
      2. Same as `case 1.3`
class_docstr_tok: ["Trade","decisions","are","made","by","strategy","and","executed","by","executor","Motivation",":","Here","are","several","typical","scenarios","for","`","BaseTradeDecision","`","Case","1",":","1",".","Outer","strategy","makes","a","decision",".","The","decision","is","not","available","at","the","start","of","current","interval","2",".","After","a","period","of","time",",","the","decision","are","updated","and","become","available","3",".","The","inner","strategy","try","to","get","the","decision","and","start","to","execute","the","decision","according","to","`","get_range_limit","`","Case","2",":","1",".","The","outer","strategy","'s","decision","is","available","at","the","start","of","the","interval","2",".","Same","as","`","case","1.3","`"]
docstr: This method will be called on the inner_trade_decision after it is generated.
  `inner_trade_decision` will be changed **inplace**.
  
  Motivation of the `mod_inner_decision`
  - Leave a hook for outer decision to affect the decision generated by the inner strategy
      - e.g. the outmost strategy generate a time range for trading. But the upper layer can only affect the
        nearest layer in the original design.  With `mod_inner_decision`, the decision can passed through multiple
        layers
  
  Parameters
  ----------
  inner_trade_decision : BaseTradeDecision
code: def mod_inner_decision(
      self, inner_trade_decision: BaseTradeDecision
  ) -> None:
      """
      This method will be called on the inner_trade_decision after it is generated.
      `inner_trade_decision` will be changed **inplace**.
  
      Motivation of the `mod_inner_decision`
      - Leave a hook for outer decision to affect the decision generated by the inner strategy
          - e.g. the outmost strategy generate a time range for trading. But the upper layer can only affect the
            nearest layer in the original design.  With `mod_inner_decision`, the decision can passed through multiple
            layers
  
      Parameters
      ----------
      inner_trade_decision : BaseTradeDecision
      """
      # base class provide a default behaviour to modify inner_trade_decision
      # trade_range should be propagated when inner trade_range is not set
      if inner_trade_decision.trade_range is None:
          inner_trade_decision.trade_range = self.trade_range
  
imports: from __future__ import annotations
  from abc import abstractmethod
  from datetime import time
  from enum import IntEnum
  from typing import TYPE_CHECKING, Any, ClassVar, Generic, List, Optional, Tuple, TypeVar, Union, cast
  from qlib.backtest.utils import TradeCalendarManager
  from qlib.data.data import Cal
  from qlib.log import get_module_logger
  from qlib.utils.time import concat_date_time, epsilon_change
  from dataclasses import dataclass
  import numpy
  import pandas
label_desc: Use image node_id 8 for calling the BaseTradeDecision obj's underlying member method code with example usage: obj.mod_inner_decision(inner_trade_decision) without return types