<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def assertDateTimesPast(self, sequence, strict=True, msg=None):
        '''Fail if any elements in ``sequence`` are not in the past.

        If the max element is a datetime, "past" is defined as anything
        prior to ``datetime.now()``; if the max element is a date,
        "past" is defined as anything prior to ``date.today()``.

        If ``strict=True``, fail unless all elements in ``sequence``
        are strictly less than ``date.today()`` (or ``datetime.now()``).
        If ``strict=False``, fail unless all elements in ``sequence``
        are less than or equal to ``date.today()`` (or
        ``datetime.now()``).

        Parameters
        ----------
        sequence : iterable
        strict : bool
        msg : str
            If not provided, the :mod:`marbles.mixins` or
            :mod:`unittest` standard message will be used.

        Raises
        ------
        TypeError
            If ``sequence`` is not iterable.
        TypeError
            If max element in ``sequence`` is not a datetime or date
            object.
        '''
        if not isinstance(sequence, collections.Iterable):
            raise TypeError('First argument is not iterable')

        # Cannot compare datetime to date, so if dates are provided use
        # date.today(), if datetimes are provided use datetime.today()
        if isinstance(max(sequence), datetime):
            target = datetime.today()
        elif isinstance(max(sequence), date):
            target = date.today()
        else:
            raise TypeError('Expected iterable of datetime or date objects')

        self.assertDateTimesBefore(sequence, target, strict=strict, msg=msg)