def parse_route_name_and_version(route_repr):
    """
    Parse a route representation string and return the route name and version number.

    :param route_repr: Route representation string.

    :return: A tuple containing route name and version number.
    """
    if ':' in route_repr:
        route_name, version = route_repr.split(':', 1)
        try:
            version = int(version)
        except ValueError:
            raise ValueError('Invalid route representation: {}'.format(route_repr))
    else:
        route_name = route_repr
        version = 1
    return route_name, version
Parse a route representation string and return the route name and version number.

    :param route_repr: Route representation string.

    :return: A tuple containing route name and version number.