code: def find_in_paths(name, paths):
      
      for path in paths:
          file_ = osp.join(path, name)
          if osp.exists(file_) and not osp.isdir(file_):
              abs_file = osp.abspath(file_)
              if os.access(file_, os.X_OK):
                  return abs_file
docs: Find an executable is a list of directories
      :return: absolute path to the first location where the executable
      is found, ``None`` otherwise.
      :rtype: string