<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def prep_nova_creds(nova_env, nova_creds):
 """ Finds relevant config options in the supernova config and cleans them up for novaclient. """

    try:
        raw_creds = dict(nova_creds.get('DEFAULT', {}), **nova_creds[nova_env])
    except KeyError:
        msg = "{0} was not found in your supernova configuration "\
              "file".format(nova_env)
        raise KeyError(msg)

    proxy_re = re.compile(r"(^http_proxy|^https_proxy)")

    creds = []
    for param, value in raw_creds.items():
        if not proxy_re.match(param):
            param = param.upper()

        if not hasattr(value, 'startswith'):
            continue

        # Get values from the keyring if we find a USE_KEYRING constant
        if value.startswith("USE_KEYRING"):
            username, credential = pull_env_credential(nova_env, param,
                                                       value)
        else:
            credential = value.strip("\"'")

        # Make sure we got something valid from the configuration file or
        # the keyring
        if not credential:
            raise LookupError("No matching credentials found in keyring")

        creds.append((param, credential))

    return creds