class_docstr: This is a helper function for make decisions
class_docstr_tok: ["This","is","a","helper","function","for","make","decisions"]
code: def clip_time_range(
      self, start_time: pd.Timestamp, end_time: pd.Timestamp
  ) -> Tuple[pd.Timestamp, pd.Timestamp]:
      start_date = start_time.date()
      val_start, val_end = concat_date_time(
          start_date, self.start_time
      ), concat_date_time(start_date, self.end_time)
      # NOTE: `end_date` should not be used. Because the `end_date` is for slicing. It may be in the next day
      # Assumption: start_time and end_time is for intra-day trading. So it is OK for only using start_date
      return max(val_start, start_time), min(val_end, end_time)
  
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 3 for calling the TradeRangeByTime obj's underlying member method code with example usage: obj.clip_time_range(start_time, end_time) and returns: max,  min