code: def __init__(self, dateTime, frequency):
      super(IntraDayRange, self).__init__()
      assert isinstance(frequency, int)
      assert frequency > 1
      assert frequency < bar.Frequency.DAY
  
      ts = int(dt.datetime_to_timestamp(dateTime))
      slot = int(ts / frequency)
      slotTs = slot * frequency
      self.__begin = dt.timestamp_to_datetime(
          slotTs, not dt.datetime_is_naive(dateTime)
      )
      if not dt.datetime_is_naive(dateTime):
          self.__begin = dt.localize(self.__begin, dateTime.tzinfo)
      self.__end = self.__begin + datetime.timedelta(seconds=frequency)
  
imports: import abc
  import datetime
  import six
  from pyalgotrade.utils import dt
  from pyalgotrade import bar
label_desc: Use image node_id 1 to create a new IntraDayRange object from inherited base classes: TimeRange with example: obj = IntraDayRange(dateTime, frequency)