<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def find_config(prefix: str) -> str: """ Find the most recent config matching `prefix` """

    matches = [conf for conf in config_models if conf.startswith(prefix)]
    if not matches:
        raise KeyError('No match found for prefix {}'.format(prefix))
    if prefix in matches:
        return prefix
    else:
        return sorted(matches)[0]