code: def test_slurm_node_list() -> None:
      with with_slurm_job_nodelist("compute-b24") as env:
          assert ["compute-b24"] == env.hostnames
      with with_slurm_job_nodelist("compute-a1,compute-b2") as env:
          assert ["compute-a1", "compute-b2"] == env.hostnames
      with with_slurm_job_nodelist("compute-b2[1,2]") as env:
          assert ["compute-b21", "compute-b22"] == env.hostnames
      with with_slurm_job_nodelist("compute-b2[011,022]") as env:
          assert ["compute-b2011", "compute-b2022"] == env.hostnames
      with with_slurm_job_nodelist("compute-b2[1-3]") as env:
          assert [
              "compute-b21",
              "compute-b22",
              "compute-b23",
          ] == env.hostnames
      with with_slurm_job_nodelist("compute-b2[1-3,5,6,8]") as env:
          assert [
              "compute-b21",
              "compute-b22",
              "compute-b23",
              "compute-b25",
              "compute-b26",
              "compute-b28",
          ] == env.hostnames
      with with_slurm_job_nodelist("compute-b2[1-3,5-6,8]") as env:
          assert [
              "compute-b21",
              "compute-b22",
              "compute-b23",
              "compute-b25",
              "compute-b26",
              "compute-b28",
          ] == env.hostnames
      with with_slurm_job_nodelist(
          "compute-b2[1-3,5-6,8],compute-a1"
      ) as env:
          assert [
              "compute-b21",
              "compute-b22",
              "compute-b23",
              "compute-b25",
              "compute-b26",
              "compute-b28",
              "compute-a1",
          ] == env.hostnames
      with with_slurm_job_nodelist("compute[042,044]") as env:
          assert ["compute042", "compute044"] == env.hostnames
      with with_slurm_job_nodelist(
          "compute[042-043,045,048-049]"
      ) as env:
          assert [
              "compute042",
              "compute043",
              "compute045",
              "compute048",
              "compute049",
          ] == env.hostnames
  
imports: import contextlib
  import os
  import signal
  import subprocess
  import typing
  from pathlib import Path
  from unittest.mock import patch
  import pytest
  import submitit
  from ..None import helpers
  from ..core import job_environment, submission, test_core, utils
  from ..core.core import Job
  from .None import slurm
label_desc: Use image node_id 27 for calling a global function with example usage: test_slurm_node_list() without return types