def clean_up_interface_vlan_configs(proposed, existing):
    """Removes unecessary and unused configs
       i.e. removes access vlan configs if a trunk port is being configured
       or removes trunk port/vlan configs if access vlan is being configured

    Args:
        proposed (dict): proposed configuration params & values
        existing (dict): existing as-is configuration params & values
        both args are being sent from the Ansible module

    Returns:
        list: ordered list of commands to be sent to device

    Note:
        Specific for Ansible module(s).  Not to be called otherwise.

    """
    commands = []
    if proposed['mode'] == 'access':
        if existing['native_vlan'] != '1':
            commands.append('no switchport trunk native vlan')
        if existing['trunk_vlans'] != '1-4094':
            commands.append('no switchport trunk allowed vlan')
        if existing['mode'] == 'trunk':
            commands.append('no switchport mode trunk')
    elif proposed['mode'] == 'trunk':
        if existing['mode'] == 'access':
            commands.append('no switchport access vlan')
    if commands:
        commands.insert(0, 'interface ' + proposed['interface'])

    return commands