docs: def extract_subject_info_extension(cert_obj):
      """Extract DataONE SubjectInfo XML doc from certificate.
  
      Certificates issued by DataONE may include an embedded XML doc containing
      additional information about the subject specified in the certificate DN. If
      present, the doc is stored as an extension with an OID specified by DataONE and
      formatted as specified in the DataONE SubjectInfo schema definition.
  
      Args:
        cert_obj: cryptography.Certificate
  
      Returns:
        str : SubjectInfo XML doc if present, else None
  
      """
      try:
          subject_info_der = cert_obj.extensions.get_extension_for_oid(
              cryptography.x509.oid.ObjectIdentifier(DATAONE_SUBJECT_INFO_OID)
          ).value.value
          return str(pyasn1.codec.der.decoder.decode(subject_info_der)[0])
      except Exception as e:
          logging.debug('SubjectInfo not extracted. reason="{}"'.format(e))