code: def sort_by_modified(files_or_folders: list) -> list:
      
      return sorted(files_or_folders, key=os.path.getmtime, reverse=True)
docs: Sort files or folders by modified time
  
      Args:
          files_or_folders: list of files or folders
  
      Returns:
          list