code: def chmod_plus_x(path):
    
    path_mode = os.stat(path).st_mode
    path_mode &= int('777', 8)
    if path_mode & stat.S_IRUSR:
      path_mode |= stat.S_IXUSR
    if path_mode & stat.S_IRGRP:
      path_mode |= stat.S_IXGRP
    if path_mode & stat.S_IROTH:
      path_mode |= stat.S_IXOTH
    os.chmod(path, path_mode)
docs: Equivalent of unix `chmod a+x path`