def __init__(
        self,
        proto_version: ProtoVersion | None = None,
        service_args: dict | None = None,
        verbose: bool | None = None,
        client: engine_client.EngineClient | None = None,
        timeout: int | None = None,
        serializer: Serializer = CIRCUIT_SERIALIZER,
        # TODO(#5996) Remove enable_streaming once the feature is stable.
        enable_streaming: bool = True,
    ) -> None:
        """Context and client for using Quantum Engine.

        Args:
            proto_version: The version of cirq protos to use. If None, then
                ProtoVersion.V2 will be used.
            service_args: A dictionary of arguments that can be used to
                configure options on the underlying client.
            verbose: Suppresses stderr messages when set to False. Default is
                true.
            client: The engine client to use, if not supplied one will be
                created.
            timeout: Timeout for polling for results, in seconds.  Default is
                to never timeout.
            serializer: Used to serialize circuits when running jobs.
            enable_streaming: Feature gate for making Quantum Engine requests using the stream RPC.
                If True, the Quantum Engine streaming RPC is used for creating jobs
                and getting results. Otherwise, unary RPCs are used.

        Raises:
            ValueError: If either `service_args` and `verbose` were supplied
                or `client` was supplied, or if proto version 1 is specified.
        """
        if (service_args or verbose) and client:
            raise ValueError('either specify service_args and verbose or client')

        self.proto_version = proto_version or ProtoVersion.V2
        if self.proto_version == ProtoVersion.V1:
            raise ValueError('ProtoVersion V1 no longer supported')
        self.serializer = serializer
        self.enable_streaming = enable_streaming

        if not client:
            client = engine_client.EngineClient(service_args=service_args, verbose=verbose)
        self.client = client
        self.timeout = timeout
Context and client for using Quantum Engine.

        Args:
            proto_version: The version of cirq protos to use. If None, then
                ProtoVersion.V2 will be used.
            service_args: A dictionary of arguments that can be used to
                configure options on the underlying client.
            verbose: Suppresses stderr messages when set to False. Default is
                true.
            client: The engine client to use, if not supplied one will be
                created.
            timeout: Timeout for polling for results, in seconds.  Default is
                to never timeout.
            serializer: Used to serialize circuits when running jobs.
            enable_streaming: Feature gate for making Quantum Engine requests using the stream RPC.
                If True, the Quantum Engine streaming RPC is used for creating jobs
                and getting results. Otherwise, unary RPCs are used.

        Raises:
            ValueError: If either `service_args` and `verbose` were supplied
                or `client` was supplied, or if proto version 1 is specified.
        
cirq-google/cirq_google/engine/engine.py