from typing import Union
import re


def _get_cimrdf_version(cim_ns) -> Union[None, str]:
    """
    Parse the cim namespace_name into a version number
    :param cim_ns: cim namespace_name
    :return: double, version number, or None if no version could be identified
    """
    match = re.search(r"(?<=CIM-schema-cim)\d{0,2}?(?=#)", cim_ns)
    if match:
        return match.group()
    else:
        return None