<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fill_delegate_proxy_activation_requirements( requirements_data, cred_file, lifetime_hours=12 ):
 """ Given the activation requirements for an endpoint and a filename for X.509 credentials, extracts the public key from the activation requirements, uses the key and the credentials to make a proxy credential, and returns the requirements data with the proxy chain filled in. """

    # get the public key from the activation requirements
    for data in requirements_data["DATA"]:
        if data["type"] == "delegate_proxy" and data["name"] == "public_key":
            public_key = data["value"]
            break
    else:
        raise ValueError(
            (
                "No public_key found in activation requirements, this endpoint "
                "does not support Delegate Proxy activation."
            )
        )

    # get user credentials from user credential file"
    with open(cred_file) as f:
        issuer_cred = f.read()

    # create the proxy credentials
    proxy = create_proxy_credentials(issuer_cred, public_key, lifetime_hours)

    # return the activation requirements document with the proxy_chain filled
    for data in requirements_data["DATA"]:
        if data["type"] == "delegate_proxy" and data["name"] == "proxy_chain":
            data["value"] = proxy
            return requirements_data
    else:
        raise ValueError(
            (
                "No proxy_chain found in activation requirements, this endpoint "
                "does not support Delegate Proxy activation."
            )
        )