code: def get_output_dir(datasets, training=True):
      """Get the output directory determined by the current global config."""
      assert isinstance(
          datasets, (tuple, list, basestring)
      ), "datasets argument must be of type tuple, list or string"
      is_string = isinstance(datasets, basestring)
      dataset_name = datasets if is_string else ":".join(datasets)
      tag = "train" if training else "test"
      # <output-dir>/<train|test>/<dataset-name>/<model-type>/
      outdir = osp.join(
          __C.OUTPUT_DIR, tag, dataset_name, __C.MODEL.TYPE
      )
      if not osp.exists(outdir):
          os.makedirs(outdir)
      return outdir
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  from ast import literal_eval
  from future.utils import iteritems
  from past.builtins import basestring
  import copy
  import logging
  import numpy
  import os
  import os.path
  import yaml
  from detectron.utils.collections import AttrDict
  from detectron.utils.io import cache_url
label_desc: Use image node_id 3 for calling a global function with example usage: get_output_dir(datasets, training) and returns: outdir