def METHOD_NAME(self, key):
    key_pub = self._key_pub(key)
    if key_pub in self._keys:
        self._keys[key_pub] += 1
    else:
        self._run(["ssh-add", "-"], stdin=key.encode())
        self._keys[key_pub] = 1
    return key_pub