def import_ecdsakey_from_pem(pem, scheme='<STR_LIT>'):
<EOL>securesystemslib.formats.PEMECDSA_SCHEMA.check_match(pem)<EOL>securesystemslib.formats.ECDSA_SCHEME_SCHEMA.check_match(scheme)<EOL>public_pem = '<STR_LIT>'<EOL>private_pem = '<STR_LIT>'<EOL>if is_pem_public(pem):<EOL><INDENT>public_pem = extract_pem(pem, private_pem=False)<EOL><DEDENT>elif is_pem_private(pem, '<STR_LIT>'):<EOL><INDENT>return import_ecdsakey_from_private_pem(pem, password=None)<EOL><DEDENT>else:<EOL><INDENT>raise securesystemslib.exceptions.FormatError('<STR_LIT>'<EOL>'<STR_LIT>' + repr(pem))<EOL><DEDENT>ecdsakey_dict = {}<EOL>keytype = '<STR_LIT>'<EOL>key_value = {'<STR_LIT>': public_pem.replace('<STR_LIT:\r\n>', '<STR_LIT:\n>'),<EOL>'<STR_LIT>': '<STR_LIT>'}<EOL>keyid = _get_keyid(keytype, scheme, key_value)<EOL>ecdsakey_dict['<STR_LIT>'] = keytype<EOL>ecdsakey_dict['<STR_LIT>'] = scheme<EOL>ecdsakey_dict['<STR_LIT>'] = keyid<EOL>ecdsakey_dict['<STR_LIT>'] = key_value<EOL>return ecdsakey_dict<EOL>
<Purpose>
  Import either a public or private ECDSA PEM.  In contrast to the other
  explicit import functions (import_ecdsakey_from_public_pem and
  import_ecdsakey_from_private_pem), this function is useful for when it is
  not known whether 'pem' is private or public.

<Arguments>
  pem:
    A string in PEM format.

  scheme:
    The signature scheme used by the imported key.
<Exceptions>
  securesystemslib.exceptions.FormatError, if 'pem' is improperly formatted.

<Side Effects>
  None.

<Returns>
  A dictionary containing the ECDSA keys and other identifying information.
  Conforms to 'securesystemslib.formats.ECDSAKEY_SCHEMA'.