code: def add(config, username, filename):
          
          try:
              client = Client()
              client.prepare_connection()
              user_api = UserApi(client)
              key_api = API(client)
              key_api.add(username, user_api, filename)
          except (ldap3.core.exceptions.LDAPNoSuchAttributeResult,
                  ldap_tools.exceptions.InvalidResult,
                  ldap3.core.exceptions.LDAPAttributeOrValueExistsResult
                  ) as err:  # pragma: no cover
              print('{}: {}'.format(type(err), err.args[0]))
          except Exception as err:  # pragma: no cover
              raise err from None
docs: Add user's SSH public key to their LDAP entry.