human
Write me a Python code to determine    if    path    is    an    exe given the following:
I wrote the below code

    def is_exe(path):
        'Determine    if    path    is    an    exe.'
        return (os.path.isfile(path) and os.access(path, os.X_OK))
    (path, _) = os.path.split(exe)
    if path:
        return is_exe(exe)
    else:
        for path in os.environ['PATH'].split(os.pathsep):
            if is_exe(os.path.join(path, exe)):
                return True
    return False

What's a good function header?
assistant
#Here is Python code to determine    if    path    is    an    exe.

def exe_exists(exe):