from datetime import datetime


def get_timestamp_id(year: bool = True, month: bool = True, date: datetime = datetime.utcnow()) -> str:
    """
    Returns timestamp id (tp_id) in format '2021-01', '2021' or '01'.
    """
    if not year:
        return date.strftime('%m')
    elif not month:
        return date.strftime('%Y')
    return date.strftime('%Y-%m')