def GetSerialPortFourOutput(compute, instance, zone, project):
    """Get the output from serial port 4 from the instance."""
    # Encrypted passwords are printed to COM4 on the windows server:
    port = 4
    cmd = compute.instances().getSerialPortOutput(
        instance=instance, project=project, zone=zone, port=port
    )
    output = cmd.execute()
    return output["contents"]