def METHOD_NAME(self, public_key, internal):
    raw_json, signature = self.private_key.pack({"publicKeys": [public_key]})
    if internal:
        internal_relays = [str(self.public_key)]
    else:
        internal_relays = []
    with disable_internal_networks():
        with override_settings(SENTRY_RELAY_WHITELIST_PK=internal_relays):
            resp = self.client.post(
                self.path,
                data=raw_json,
                content_type="application/json",
                HTTP_X_SENTRY_RELAY_ID=self.relay_id,
                HTTP_X_SENTRY_RELAY_SIGNATURE=signature,
            )
    return json.loads(resp.content), resp.status_code