code: def datetime_aligned(ds1, ds2, maxLen=None):
      """
      Returns two dataseries that exhibit only those values whose datetimes are in both dataseries.
  
      :param ds1: A DataSeries instance.
      :type ds1: :class:`DataSeries`.
      :param ds2: A DataSeries instance.
      :type ds2: :class:`DataSeries`.
      :param maxLen: The maximum number of values to hold for the returned :class:`DataSeries`.
          Once a bounded length is full, when new items are added, a corresponding number of items are discarded from the
          opposite end. If None then dataseries.DEFAULT_MAX_LEN is used.
      :type maxLen: int.
      """
      aligned1 = dataseries.SequenceDataSeries(maxLen)
      aligned2 = dataseries.SequenceDataSeries(maxLen)
      Syncer(ds1, ds2, aligned1, aligned2)
      return (aligned1, aligned2)
  
file_path: pyalgotrade/pyalgotrade/dataseries/aligned.py
imports: from pyalgotrade import dataseries
label_desc: Use image node_id 1 for calling a global function with example usage: datetime_aligned(ds1, ds2, maxLen) and returns: aligned1,  aligned2