def areinstance(tokens, classes):
    """
    >>> tokens = (TimeToken(15), TimeToken(16))
    >>> areinstance(tokens, TimeToken)
    True
    >>> tokens = (TimeToken(15), DayToken(7, 5, 2018))
    >>> areinstance(tokens, TimeToken)
    False
    >>> areinstance(tokens, (TimeToken, DayToken))
    True
    """
    assert isinstance(classes, type) or isinstance(classes, tuple), \
        "Classes must either be a tuple or a type."
    if isinstance(classes, type):
        classes = (classes,)
    return all([
        any([isinstance(token, cls) for cls in classes]) for token in tokens])