def is_pem_public(pem):
<EOL>securesystemslib.formats.PEMRSA_SCHEMA.check_match(pem)<EOL>pem_header = '<STR_LIT>'<EOL>pem_footer = '<STR_LIT>'<EOL>try:<EOL><INDENT>header_start = pem.index(pem_header)<EOL>pem.index(pem_footer, header_start + len(pem_header))<EOL><DEDENT>except ValueError:<EOL><INDENT>return False<EOL><DEDENT>return True<EOL>
<Purpose>
  Checks if a passed PEM formatted string is a PUBLIC key, by looking for the
  following pattern:

  '-----BEGIN PUBLIC KEY----- ... -----END PUBLIC KEY-----'

  >>> rsa_key = generate_rsa_key()
  >>> public = rsa_key['keyval']['public']
  >>> private = rsa_key['keyval']['private']
  >>> is_pem_public(public)
  True
  >>> is_pem_public(private)
  False

<Arguments>
  pem:
    A string in PEM format.

<Exceptions>
  securesystemslib.exceptions.FormatError, if 'pem' is improperly formatted.

<Side Effects>
  None

<Returns>
  True if 'pem' is public and false otherwise.