def get_executable(path, default):
    if not path:
        return default
    if path.endswith('.py'):
        return path
    basename = os.path.basename(path)
    try:
        which = shutil.which
    except __HOLE__:
        which = None
    else:
        if which(basename) == path:
            return basename
    rel = os.path.relpath(path)
    if rel.startswith('../'):
        if which is None and os.path.isabs(path):
            return basename
        return path
    return rel
dataset/ETHPy150Open epsy/clize/clize/runner.py/get_executable