code: def _write_test_code(dest_dir):
      for test_file in _iter_test_files():
          py_file = _py_file_for_test(test_file)
          examples = _examples_for_test(test_file)
          py_file_dest = os.path.join(dest_dir, py_file)
          with open(py_file_dest, "w") as py_out:
              for example in examples:
                  py_out.write(example.source)
                  py_out.write("\n")
  
file_path: guildai/tools.py
imports: import argparse
  import doctest
  import glob
  import os
  import subprocess
  import sys
  import tempfile
label_desc: Use image node_id 3 for calling a global function with example usage: _write_test_code(dest_dir) without return types