def METHOD_NAME(start_date: str, end_date: str, record: dict):
    try:
        start_date = parse_date(start_date)
        end_date = parse_date(end_date)
    except (ParserError, TypeError) as e:
        raise Exception(f"Date parse error: {e} in record {record}")
    duration = end_date - start_date
    return duration.total_seconds()