<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_route(enode, route, via, shell=None):
 """ Add a new static route. :param enode: Engine node to communicate with. :type enode: topology.platforms.base.BaseNode :param str route: Route to add, an IP in the form ``'192.168.20.20/24'`` or ``'2001::0/24'`` or ``'default'``. :param str via: Via for the route as an IP in the form ``'192.168.20.20/24'`` or ``'2001::0/24'``. :param shell: Shell name to execute commands. If ``None``, use the Engine Node default shell. :type shell: str or None """

    via = ip_address(via)

    version = '-4'
    if (via.version == 6) or \
            (route != 'default' and ip_network(route).version == 6):
        version = '-6'

    cmd = 'ip {version} route add {route} via {via}'.format(
        version=version, route=route, via=via
    )

    response = enode(cmd, shell=shell)
    assert not response