<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ec_init(spec):
 """ Initiate a key bundle with an elliptic curve key. :param spec: Key specifics of the form:: {"type": "EC", "crv": "P-256", "use": ["sig"]} :return: A KeyBundle instance """


    kb = KeyBundle(keytype="EC")
    if 'use' in spec:
        for use in spec["use"]:
            eck = new_ec_key(crv=spec['crv'], use=use)
            kb.append(eck)
    else:
        eck = new_ec_key(crv=spec['crv'])
        kb.append(eck)

    return kb