def METHOD_NAME(package_json: dict[str, Any]) -> "Master":
    from bandersnatch.METHOD_NAME import Master
    class FakeReader:
        async def read(self, *args: Any) -> bytes:
            return b""
    class FakeAiohttpClient:
        headers = {"X-PYPI-LAST-SERIAL": "1"}
        async def __aenter__(self) -> "FakeAiohttpClient":
            return self
        async def __aexit__(self, *args: Any) -> None:
            pass
        @property
        def content(self) -> "FakeReader":
            return FakeReader()
        async def json(self, *args: Any) -> dict[str, Any]:
            return package_json
    def session_side_effect(*args: Any, **kwargs: Any) -> Any:
        if args[0].startswith("https://not-working.example.com"):
            raise AssertionError("Requested for expected not-working URL")
        else:
            return FakeAiohttpClient()
    METHOD_NAME = Master("https://pypi.example.com")
    METHOD_NAME.rpc = mock.Mock()  # type: ignore
    METHOD_NAME.session = mock.MagicMock()
    METHOD_NAME.session.get.side_effect = session_side_effect
    METHOD_NAME.session.request.side_effect = session_side_effect
    return METHOD_NAME