code: def subnet_in_az(idx):
      azs = ["a", "b", "c", "d"]
      subnet = copy.copy(DEFAULT_SUBNET)
      subnet["AvailabilityZone"] = "us-west-2" + azs[idx % 4]
      subnet["SubnetId"] = f"subnet-{idx:07d}"
      return subnet
  
imports: import copy
  import ray
  from datetime import datetime
  from ray.autoscaler.tags import TAG_RAY_LAUNCH_CONFIG, TAG_RAY_NODE_KIND, NODE_KIND_HEAD, TAG_RAY_USER_NODE_TYPE
label_desc: Use image node_id 2 for calling a global function with example usage: subnet_in_az(idx) and returns: subnet