code: def _get_arcadia_root():
      arcadia_root = None
      path = os.path.dirname(os.path.abspath(sys.argv[0]))
      while True:
          cmake_lists_file = os.path.join(path, "CMakeLists.txt")
          if os.path.isfile(cmake_lists_file):
              if _re_match_line_in_file(
                  cmake_lists_file, "^(project|PROJECT)\("
              ):
                  arcadia_root = path
                  break
  
          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
  
imports: from __future__ import absolute_import, print_function
  import argparse
  import errno
  import os
  import platform
  import re
  import shutil
  import subprocess
  import sys
  import zipfile
label_desc: Use image node_id 4 for calling a global function with example usage: _get_arcadia_root() and returns: arcadia_root