@property
    @memoized
    def backend_class(self):
        # Superusers can create/edit any backend
        # Regular users can only create/edit Telerivet backends for now
        if not self.is_superuser and self.hq_api_id != SQLTelerivetBackend.get_api_id():
            raise Http404()
        backend_classes = get_sms_backend_classes()
        try:
            return backend_classes[self.hq_api_id]
        except __HOLE__:
            raise Http404()
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/sms/views.py/AddGatewayViewMixin.backend_class