def correct_date(yr, dt):
    """
    Some transcripts have incorrect date, correcting it.

    Args:
        yr (int): actual
        dt (datetime): given date

    Returns:
        datetime: corrected date

    """
    dt = datetime.strptime(dt, "%Y-%m-%d %H:%M:%S")
    if dt.year != yr:
        dt = dt.replace(year=yr)
    return dt.strftime("%Y-%m-%d %H:%M:%S")

    Some transcripts have incorrect date, correcting it.

    Args:
        yr (int): actual
        dt (datetime): given date

    Returns:
        datetime: corrected date

    
llama-index-integrations/readers/llama-index-readers-earnings-call-transcript/llama_index/readers/earnings_call_transcript/utils.py