code: def setup_archive(name, sources):
      global archive
      global obj_suffix
      archive = t.adjust_names(name)[0]
      obj_suffix = t.adjust_names(".obj")[0]
      output = StringIO.StringIO()
      t.write("jamroot.jam", "")
      output.write(
          """\
  static-lib %s :
  """
          % name.split(".")[0]
      )
      ## sort the sources, so we can test order of the globbed members
      for s in sorted(sources):
          output.write(
              """\
      %s
  """
              % s
          )
      output.write(
          """\
      ;
  """
      )
      t.write("lib/jamfile.jam", output.getvalue())
      create_sources("lib", sources)
      t.run_build_system(subdir="lib")
      built_archive = "lib/bin/$toolset/debug*/%s" % name
      t.expect_addition(built_archive)
      t.copy(built_archive, name)
      t.rm("lib")
  
imports: import os
  import sys
  import StringIO
  import BoostBuild
label_desc: Use image node_id 2 for calling a global function with example usage: setup_archive(name, sources) without return types