def METHOD_NAME():
    from django.test.METHOD_NAME import Client
    class _Client(Client):
        def login(
            self,
            user=None,
            backend="django.contrib.auth.backends.ModelBackend",
            **credentials
        ):
            if user is None:
                return super(_Client, self).login(**credentials)
            with mock.patch("django.contrib.auth.authenticate") as authenticate:
                user.backend = backend
                authenticate.return_value = user
                return super(_Client, self).login(**credentials)
        @property
        def json(self):
            return PartialMethodCaller(
                obj=self, content_type='application/json;charset="utf-8"'
            )
    return _Client()