code: def test_write_resource_group(batch):
      with tempfile.NamedTemporaryFile(
          "w"
      ) as input_file1, tempfile.NamedTemporaryFile(
          "w"
      ) as input_file2, tempfile.TemporaryDirectory() as output_dir:
          b = batch
          input = b.read_input_group(
              in1=input_file1.name, in2=input_file2.name
          )
  
          b.write_output(input, output_dir + "/foo")
          b.run()
  
          assert (
              open(input_file1.name).read()
              == open(output_dir + "/foo.in1").read()
          )
          assert (
              open(input_file2.name).read()
              == open(output_dir + "/foo.in2").read()
          )
  
imports: from typing import AsyncIterator
  import os
  import pytest
  import subprocess
  import tempfile
  from hailtop import pip_version
  from hailtop.batch import Batch, LocalBackend, ResourceGroup
  from hailtop.batch.resource import JobResourceFile
  from hailtop.batch.utils import concatenate
label_desc: Use image node_id 4 for calling a global function with example usage: test_write_resource_group(batch) without return types