code: def filter_dirs(root, dirs, excl_paths):
      
      filtered_dirs = []
      for dirpath in dirs:
          abspath = os.path.abspath(os.path.join(root, dirpath))
          if os.path.basename(abspath) in _SKIP_DIRS:
              continue
          if abspath not in excl_paths:
              filtered_dirs.append(dirpath)
      return filtered_dirs
docs: Filter directory paths based on the exclusion rules defined in
      'excl_paths'.