'Get an individual SSH public key by its name and location.
:param name: Name of the key pair to retrieve.
:type name: ``str``
:keyword ex_location: Key\'s region
:type ex_location: :class:`NodeLocation`
:return: Public key
:rtype: :class:`KeyPair`'

def get_key_pair(self, name, ex_location=None):

    keys = [key for key in self.list_key_pairs(ex_location) if (key.name == name)]
    if (not keys):
        raise Exception(("No    key    named    '%s'" % name))
    return keys[0]
