code: def test_output_path(path=None):
      """
      Get dir in the suite output_path for the current test case
      """
      test_log_path = _get_ya_config().current_test_log_path
      test_out_dir, log_ext = os.path.splitext(test_log_path)
      log_ext = log_ext.strip(".")
      if log_ext.isdigit():
          test_out_dir = os.path.splitext(test_out_dir)[0]
          test_out_dir = test_out_dir + "_" + log_ext
      try:
          os.makedirs(test_out_dir)
      except OSError as e:
          if e.errno != errno.EEXIST:
              raise
      return _join_path(test_out_dir, path)
  
imports: import errno
  import functools
  import json
  import os
  import sys
  import threading
  import six
label_desc: Use image node_id 30 for calling a global function with example usage: test_output_path(path) and returns: _join_path