class_docstr: Find appropriate date and adjust date.
class_docstr_tok: ["Find","appropriate","date","and","adjust","date","."]
docstr: Align the index of time_point in the calendar.
  
  Parameters
  ----------
  time_point
  tp_type : str
  
  Returns
  -------
  index : int
docstr_tok: ["Align","the","index","of","time_point","in","the","calendar",".","Parameters","--","--","--","--","--","time_point","tp_type",":","str","Returns","--","--","--","-","index",":","int"]
code: def align_idx(self, time_point, tp_type="start") -> int:
      """
      Align the index of time_point in the calendar.
  
      Parameters
      ----------
      time_point
      tp_type : str
  
      Returns
      -------
      index : int
      """
      if time_point is None:
          # `None` indicates unbounded index/boarder
          return None
      time_point = pd.Timestamp(time_point)
      if tp_type == "start":
          idx = bisect.bisect_left(self.cals, time_point)
      elif tp_type == "end":
          idx = bisect.bisect_right(self.cals, time_point) - 1
      else:
          raise NotImplementedError(
              f"This type of input is not supported"
          )
      return idx
  
imports: import bisect
  from copy import deepcopy
  import pandas
  from qlib.data import D
  from qlib.utils import hash_args
  from qlib.utils.mod import init_instance_by_config
  from qlib.workflow import R
  from qlib.config import C
  from qlib.log import get_module_logger
  from pymongo import MongoClient
  from pymongo.database import Database
  from typing import Union
  from pathlib import Path
label_desc: Use image node_id 5 for calling the TimeAdjuster obj's underlying member method code with example usage: obj.align_idx(time_point, tp_type) and returns: idx, None