def get_dir_path(script_file, sibling):
  if 'GAE_SDK_ROOT' in os.environ:
    gae_sdk_root = os.path.abspath(os.environ['GAE_SDK_ROOT'])



    os.environ['GAE_SDK_ROOT'] = gae_sdk_root
    for dir_path in [gae_sdk_root,
                     os.path.join(gae_sdk_root, 'google_appengine')]:
      if os.path.exists(os.path.join(dir_path, sibling)):
        return dir_path
    raise ValueError('GAE_SDK_ROOT %r does not refer to a valid SDK '
                     'directory' % gae_sdk_root)
  else:
    py_file = script_file.replace('.pyc', '.py')
    dir_paths = [os.path.abspath(os.path.dirname(os.path.realpath(py_file))),
                 os.path.abspath(os.path.dirname(py_file))]
    for dir_path in dir_paths:
      sibling_path = os.path.join(dir_path, sibling)
      if os.path.exists(sibling_path):
        return dir_path
    raise ValueError('Could not determine SDK root; please set GAE_SDK_ROOT '
                     'environment variable.')
Get the estimated probability.
dataset/ETHPy150Open GoogleCloudPlatform/python-compat-runtime/appengine-compat/exported_appengine_sdk/wrapper_util.py/get_dir_path--crossover with--dataset/ETHPy150Open beloglazov/openstack-neat/neat/locals/overload/mhod/multisize_estimation.py/estimate_probability