code: def _get_arcadia_root():
      arcadia_root = None
      path = os.path.dirname(os.path.abspath(sys.argv[0]))
      while True:
          if os.path.isfile(os.path.join(path, ".arcadia.root")):
              arcadia_root = path
              break
  
          if path == os.path.dirname(path):
              break
  
          path = os.path.dirname(path)
  
      assert (
          arcadia_root is not None
      ), "you are probably trying to use this script with repository being checkout not from the root"
      return arcadia_root
  
file_path: catboost/catboost/jvm-packages/catboost4j-prediction/src/native_impl/regenerate_jni.py
imports: from __future__ import absolute_import, print_function
  import distutils.spawn
  import os
  import subprocess
  import sys
label_desc: Use image node_id 1 for calling a global function with example usage: _get_arcadia_root() and returns: arcadia_root