docs: def get_extension_by_name(cert_obj, extension_name):
      """Get a standard certificate extension by attribute name.
  
      Args:
        cert_obj: cryptography.Certificate
          Certificate containing a standard extension.
  
        extension_name : str
          Extension name. E.g., 'SUBJECT_DIRECTORY_ATTRIBUTES'.
  
      Returns:
        Cryptography.Extension
  
      """
      try:
          return cert_obj.extensions.get_extension_for_oid(
              getattr(cryptography.x509.oid.ExtensionOID, extension_name)
          )
      except cryptography.x509.ExtensionNotFound:
          pass