import re


def get_ospf_spf_scheduled_time(log):
    """
    Get OSPF spf scheduled time in log 'Jun 12 03:32:19.068983 OSPF SPF scheduled for topology default in 8s' 

    Args:
        log ('str'): log string

    Returns:
        date time ('str')  
    """  
    # Jun 12 03:32:19.068983 OSPF SPF scheduled for topology default in 8s
    p_scheduled = ('(?P<date>\S+\s+\d+) (?P<scheduled_time>\d+\:\d+\:\d+\.\d+) '\
        'OSPF SPF scheduled for topology default in (?P<spf_change>\d+)s')    
    m = re.match(p_scheduled, log)

    try:
        if m:
            group = m.groupdict()
            scheduled_time = group['scheduled_time']
            return scheduled_time
    except KeyError as e:
        raise KeyError(f"Key issue with exception: {str(e)}") from e