code: def test_read_info_array(name: str, state: str) -> None:
      example = "JobID|State\n12_0|R\n12_[2,4-12]|X"
      watcher = slurm.SlurmInfoWatcher()
      for jobid in ["12_2", "12_4"]:
          watcher.register_job(jobid)
      output = watcher.read_info(example)
      assert output.get(name, {}).get("State", "U") == state
  
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 19 for calling a global function with example usage: test_read_info_array(name, state) without return types