old_contents: from bs4 import BeautifulSoup
  
  def apply_backcompat_rules(self):
      for el in self.find_all(class_="hcard"):
          el["class"].append("h-card")
  
new_contents: from bs4 import BeautifulSoup
  
  ## add modern classnames for older mf classnames
  def apply_rules(doc):
      for el in doc.find_all(class_="hcard"):
          el["class"].append("h-card")
  
subject: Update backcompat.py