code: def potential_reverts_of(self, commit, commits):
      submodule_update_str = [
          "Update TensorPipe submodule",
          "Updating submodules",
          "Automated submodule update",
      ]
      if any(a in commit.title for a in submodule_update_str):
          return []
  
      features = self.features(commit)
      if "Reverted" in features.labels:
          reasons = {"GithubBot": "Reverted"}
      else:
          reasons = {}
  
      index = commits.index(commit)
      # -8 to remove the (#35011)
      cleaned_title = commit.title[:-10]
      # NB: the index + 2 is sketch
      reasons.update(
          {
              (index + 2 + delta): cand
              for delta, cand in enumerate(commits[index + 1 :])
              if cleaned_title in cand.title
              and commit.commit_hash != cand.commit_hash
          }
      )
      return reasons
  
file_path: pytorch/scripts/release_notes/categorize.py
imports: import argparse
  import os
  import textwrap
  from pathlib import Path
  import common
  import torch
  from classifier import CategoryConfig, CommitClassifier, CommitClassifierInputs, get_author_map, get_file_map, XLMR_BASE
  from commitlist import CommitList
  from common import get_commit_data_cache, topics
label_desc: Use image node_id 4 for calling the Categorizer obj's underlying member method code with example usage: obj.potential_reverts_of(commit, commits) and returns: reasons, list