def load(self, requirements_file=None):
        """Load or reload requirements from a requirements.txt file.

        :param requirements_file: if not given, the filename used from
            initialization will be read again.
        """
        if requirements_file is None:
            requirements_file = self.filename
            if requirements_file is None:
                raise ValueError("no filename provided")
        elif isinstance(requirements_file, text_type):
            requirements_file = Path(requirements_file)
        self.clear()
        with requirements_file.open() as f:
            self.loads(f.read())

        if isinstance(requirements_file, (text_type, Path)):
            self.filename = requirements_file
def debug_instance(
        self,
    ) -> Callable[[appengine.DebugInstanceRequest], operations_pb2.Operation]:
        r"""Return a callable for the debug instance method over gRPC.

        Enables debugging on a VM instance. This allows you
        to use the SSH command to connect to the virtual machine
        where the instance lives. While in "debug mode", the
        instance continues to serve live traffic. You should
        delete the instance when you are done debugging and then
        allow the system to take over and determine if another
        instance should be started.

        Only applicable for instances in App Engine flexible
        environment.

        Returns:
            Callable[[~.DebugInstanceRequest],
                    ~.Operation]:
                A function that, when called, will call the underlying RPC
                on the server.
        """
        # Generate a "stub function" on-the-fly which will actually make
        # the request.
        # gRPC handles serialization and deserialization, so we just need
        # to pass in the functions for each.
        if "debug_instance" not in self._stubs:
            self._stubs["debug_instance"] = self.grpc_channel.unary_unary(
                "/google.appengine.v1.Instances/DebugInstance",
                request_serializer=appengine.DebugInstanceRequest.serialize,
                response_deserializer=operations_pb2.Operation.FromString,
            )
        return self._stubs["debug_instance"]