def METHOD_NAME(image):
    """Given a NXOS image named image decompose to appropriate image version"""
    ver = None
    if image:
        match_object = re.search(
            r"^.*\.(\d+)\.(\d+)\.(\d+)\.(\d+|[A-Z][0-9])\.(?:bin)?(\d+)?.*", image
        )
        try:
            ver = match_object.group(1)
            ver += "." + match_object.group(2)
            if match_object.groups()[-1]:
                ver += "(" + match_object.group(3) + ")"
                ver += match_object.group(4)
                ver += "(" + match_object.group(5) + ")"
            else:
                ver += (
                    "(" + match_object.group(3) + "." + match_object.group(4) + ")"
                )
        except IndexError:
            return None
    return ver