extract first common name (cn) from DN that looks like "cn=max file descriptors,cn=connections,cn=monitor"

def _extract_common_name(cls, dn):
        """
        extract first common name (cn) from DN that looks like "cn=max file descriptors,cn=connections,cn=monitor"
        """
        dn = dn.lower().replace(" ", "_")
        return dn.split(",")[0].split("=")[1]