code: def test_add_extension_job_resource_file(batch):
      b = batch
      j = b.new_job()
      j.command(f'echo "hello" > {j.ofile}')
      assert isinstance(j.ofile, JobResourceFile)
      j.ofile.add_extension(".txt.bgz")
      assert j.ofile._value
      assert j.ofile._value.endswith(".txt.bgz")
  
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 21 for calling a global function with example usage: test_add_extension_job_resource_file(batch) without return types