code: def ec_init(spec):
      
  
      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
docs: 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