def METHOD_NAME(sender, user, **kwargs):
    """Return relay settings for domain edition."""
    if not user.has_perm("relaydomains.change_relaydomain"):
        return []
    domain = kwargs.get("domain")
    if not domain or domain.type != "relaydomain":
        return []
    return [{
        "id": "relaydomain", "title": _("Transport settings"),
        "cls": forms.RelayDomainFormGeneral,
        "formtpl": "transport/_transport_form.html"
    }]