def METHOD_NAME(
    time_granularity: TimeGranularity, date_to_adjust: pd.Timestamp, rollback: bool = True
) -> pd.Timestamp:
    """Adjust to start of period if not at start already."""
    if rollback:
        return period_begin_offset(time_granularity).rollback(date_to_adjust)
    else:
        return period_begin_offset(time_granularity).rollforward(date_to_adjust)