code: def test_basic(self):
      # New instance.
      instance = InstanceUtil.new_instance("i-123", "type_1", "rq-1")
      assert instance.instance_id == "i-123"
      assert instance.instance_type == "type_1"
      assert instance.launch_request_id == "rq-1"
      assert instance.status == Instance.QUEUED
  
      # Set status.
      InstanceUtil.set_status(instance, Instance.REQUESTED)
      assert instance.status == Instance.REQUESTED
  
      # Set status with invalid status.
      with pytest.raises(InvalidInstanceStatusError):
          InstanceUtil.set_status(instance, Instance.RAY_RUNNING)
  
      with pytest.raises(InvalidInstanceStatusError):
          InstanceUtil.set_status(instance, Instance.UNKNOWN)
  
file_path: ray/python/ray/autoscaler/v2/tests/test_instance_manager.py
imports: import os
  import sys
  import unittest
  from typing import Dict, Set
  from unittest.mock import patch
  import pytest
  from ray.autoscaler.v2.instance_manager.instance_manager import InstanceUtil
  from ray.autoscaler.v2.schema import InvalidInstanceStatusError
  from ray.core.generated.instance_manager_pb2 import Instance
label_desc: Use image node_id 1 for calling the InstanceUtilTest obj's underlying member method code with example usage: obj.test_basic() without return types