from datetime import datetime, timedelta

def get_iso_date_range(input_date=None):
    previous_monday_start, recent_sunday_end = get_previous_monday_and_recent_sunday(input_date)
    previous_monday_iso = previous_monday_start.isoformat()
    recent_sunday_iso = recent_sunday_end.isoformat()

    return previous_monday_iso, recent_sunday_iso

def get_previous_monday_and_recent_sunday(input_date=None):
    # If an input date is provided, parse it; otherwise, use today's date
    if input_date:
        today = datetime.strptime(input_date, "%Y-%m-%d")
    else:
        today = datetime.now()

    # Find this week's Monday based on the provided or current date
    start_of_this_week = today - timedelta(days=today.weekday())

    # Find the previous Monday (start of last week)
    previous_monday_start = start_of_this_week - timedelta(days=7)
    previous_monday_start = previous_monday_start.replace(hour=0, minute=0, second=0, microsecond=0)

    # Find the end of the last week (Sunday)
    recent_sunday_end = previous_monday_start + timedelta(days=6, hours=23, minutes=59, seconds=59, microseconds=999999)

    return previous_monday_start, recent_sunday_end
