code: def get_test_output_path(pattern):
      assert "{}" in pattern
      result = yc.test_output_path(pattern.format(""))
      attempt = 0
      while os.path.exists(result):
          result = yc.test_output_path(pattern.format(attempt))
          attempt += 1
      return result
  
imports: import os
  import pytest
  import re
  import yatest.common
  from lib import data_file, get_limited_precision_dsv_diff_tool
label_desc: Use image node_id 2 for calling a global function with example usage: get_test_output_path(pattern) and returns: result