class_docstr: Adds integration with ya, helps in finding dependencies
class_docstr_tok: ["Adds","integration","with","ya",",","helps","in","finding","dependencies"]
code: def _detect_output_root(self):
      # if run from kept test working dir
      if os.path.exists(TESTING_OUT_DIR_NAME):
          return TESTING_OUT_DIR_NAME
  
      # if run from source dir
      if sys.version_info.major == 3:
          test_results_dir = "py3test"
      else:
          test_results_dir = "pytest"
  
      test_results_output_path = os.path.join(
          "test-results", test_results_dir, TESTING_OUT_DIR_NAME
      )
      if os.path.exists(test_results_output_path):
          return test_results_output_path
  
      if os.path.exists(os.path.dirname(test_results_output_path)):
          os.mkdir(test_results_output_path)
          return test_results_output_path
  
      return None
  
imports: import os
  import sys
  import logging
  import json
  import six
  from .tools import to_str
  from .external import ExternalDataInfo
label_desc: Use image node_id 18 for calling the Ya obj's underlying member method code with example usage: obj._detect_output_root() and returns: None, TESTING_OUT_DIR_NAME, test_results_output_path, test_results_output_path