'Given a public key, look it up in the EC2 KeyPair database. If it
exists, return any information we have about it. Otherwise, create it.
Keys that are created are named based on their comment and fingerprint.
:rtype: ``dict``'

def ex_find_or_import_keypair_by_key_material(self, pubkey):

    key_fingerprint = get_pubkey_ssh2_fingerprint(pubkey)
    key_comment = get_pubkey_comment(pubkey, default='unnamed')
    key_name = ('%s-%s' % (key_comment, key_fingerprint))
    key_pairs = self.list_key_pairs()
    key_pairs = [key_pair for key_pair in key_pairs if (key_pair.fingerprint == key_fingerprint)]
    if (len(key_pairs) >= 1):
        key_pair = key_pairs[0]
        result = {'keyName': key_pair.name, 'keyFingerprint': key_pair.fingerprint}
    else:
        result = self.ex_import_keypair_from_string(key_name, pubkey)
    return result
