class_docstr: This is a helper function for make decisions
class_docstr_tok: ["This","is","a","helper","function","for","make","decisions"]
code: def __call__(
      self, trade_calendar: TradeCalendarManager
  ) -> Tuple[int, int]:
      if trade_calendar is None:
          raise NotImplementedError(
              "trade_calendar is necessary for getting TradeRangeByTime."
          )
  
      start_date = trade_calendar.start_time.date()
      val_start, val_end = concat_date_time(
          start_date, self.start_time
      ), concat_date_time(start_date, self.end_time)
      return trade_calendar.get_range_idx(val_start, val_end)
  
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 2 for calling the TradeRangeByTime obj's underlying member method code with example usage: obj.__call__(trade_calendar) and returns: trade_calendar