code: def init(doctest_namespace):
      # This gets run once per process -- must avoid race conditions
      print("setting up doctest...")
  
      doctest_namespace["Batch"] = batch.Batch
  
      olddir = os.getcwd()
      os.chdir(
          os.path.join(
              os.path.dirname(os.path.realpath(__file__)), "docs"
          )
      )
      try:
          print("finished setting up doctest...")
          yield
      finally:
          os.chdir(olddir)
  
imports: import doctest
  import os
  import pytest
  from hailtop import batch
label_desc: Use image node_id 2 for calling a global function with example usage: init(doctest_namespace) without return types