'Create a new SSH key.
:param      name: Key name (required)
:type       name: ``str``
:param      public_key: Valid public key string (required)
:type       public_key: ``str``'

def create_key_pair(self, name, public_key=''):

    attr = {'name': name, 'public_key': public_key}
    res = self.connection.request('/v2/account/keys', method='POST', data=json.dumps(attr))
    data = res.object['ssh_key']
    return self._to_key_pair(data=data)
