code: def ensure_single_resource(data_dir, group):
      resources = [r for r in all_resources if r.name() == group]
      if not resources:
          raise RuntimeError(f"no group {group!r}")
      ensure_resources(data_dir, resources)
  
imports: import timeit
  import contextlib
  import hail
  import logging
  import os
  import re
  import shutil
  import signal
  from py4j.protocol import Py4JError
  from .resources import all_resources
label_desc: Use image node_id 4 for calling a global function with example usage: ensure_single_resource(data_dir, group) without return types