<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def revert_snapshot(name, snap_name, runas=None):
    '''
    Revert a VM to a snapshot

    :param str name:
        Name/ID of VM to revert to a snapshot

    :param str snap_name:
        Name/ID of snapshot to revert to

    :param str runas:
        The user that the prlctl command will be run as

    Example:

    .. code-block:: bash

        salt '*' parallels.revert_snapshot macvm base-with-updates runas=macdev
    '''
    # Validate VM and snapshot names
    name = salt.utils.data.decode(name)
    snap_name = _validate_snap_name(name, snap_name, runas=runas)

    # Construct argument list
    args = [name, '--id', snap_name]

    # Execute command and return output
    return prlctl('snapshot-switch', args, runas=runas)