docs: def get_subject(self, msg):
          """Extracts the subject line from an EmailMessage object."""
  
          text, encoding = decode_header(msg['subject'])[-1]
  
          try:
              text = text.decode(encoding)
  
          # If it's already decoded, ignore error
          except AttributeError:
              pass
  
          return text