def abbreviated_interface_name(interface, addl_name_map=None, addl_reverse_map=None):
name_map = {}<EOL>name_map.update(base_interfaces)<EOL>interface_type, interface_number = split_interface(interface)<EOL>if isinstance(addl_name_map, dict):<EOL><INDENT>name_map.update(addl_name_map)<EOL><DEDENT>rev_name_map = {}<EOL>rev_name_map.update(reverse_mapping)<EOL>if isinstance(addl_reverse_map, dict):<EOL><INDENT>rev_name_map.update(addl_reverse_map)<EOL><DEDENT>if name_map.get(interface_type):<EOL><INDENT>canonical_type = name_map.get(interface_type)<EOL><DEDENT>else:<EOL><INDENT>canonical_type = interface_type<EOL><DEDENT>try:<EOL><INDENT>abbreviated_name = rev_name_map[canonical_type] + py23_compat.text_type(<EOL>interface_number<EOL>)<EOL>return abbreviated_name<EOL><DEDENT>except KeyError:<EOL><INDENT>pass<EOL><DEDENT>return interface<EOL>
Function to return an abbreviated representation of the interface name.

    :param interface: The interface you are attempting to abbreviate.
    :param addl_name_map (optional): A dict containing key/value pairs that updates
    the base mapping. Used if an OS has specific differences. e.g. {"Po": "PortChannel"} vs
    {"Po": "Port-Channel"}
    :param addl_reverse_map (optional): A dict containing key/value pairs that updates
    the reverse mapping. Used if an OS has specific differences. e.g. {"PortChannel": "Po"} vs
    {"PortChannel": "po"}