'Retrieve a single key pair.
:param name: Name of the key pair to retrieve.
:type name: ``str``
:rtype: :class:`.KeyPair`'

def get_key_pair(self, name):

    qkey = [k for k in self.list_key_pairs() if (k.name == name)][0]
    data = self.connection.request(('/v2/account/keys/%s' % qkey.extra['id'])).object['ssh_key']
    return self._to_key_pair(data=data)
