code: def test_with_envs():
      assert with_envs(
          ["echo $RAY_HEAD_IP", "ray start"],
          {"RAY_HEAD_IP": "127.0.0.0"},
      ) == [
          "export RAY_HEAD_IP=127.0.0.0; echo $RAY_HEAD_IP",
          "export RAY_HEAD_IP=127.0.0.0; ray start",
      ]
  
      assert with_head_node_ip(["echo $RAY_HEAD_IP"], "127.0.0.0") == [
          "export RAY_HEAD_IP=127.0.0.0; echo $RAY_HEAD_IP"
      ]
  
      assert (
          "export RAY_HEAD_IP=456"
          in with_envs(
              ["echo $RAY_CLOUD_ID"],
              {"RAY_CLOUD_ID": "123", "RAY_HEAD_IP": "456"},
          )[0]
      )
      assert (
          "export RAY_CLOUD_ID=123"
          in with_envs(
              ["echo $RAY_CLOUD_ID"],
              {"RAY_CLOUD_ID": "123", "RAY_HEAD_IP": "456"},
          )[0]
      )
  
imports: import os
  import sys
  import pytest
  from ray.autoscaler._private.util import with_envs, with_head_node_ip
label_desc: Use image node_id 1 for calling a global function with example usage: test_with_envs() without return types