def device_mapper(os_type: str, proto: str = "netmiko"):
    """
    map an os type to a netmiko device_type

    :params os_type: type str
    :params proto: type str, default "netmiko"

    :returns: device_type string
    """
    if proto == "netmiko":
        device_types = {
            "ios": "cisco_ios",
            "iosxr": "cisco_xr",
            "iosxe": "cisco_xe",
            "nxos": "cisco_nxos",
            "eos": "arista_eos",
        }
        try:
            result = device_types[os_type]
        except KeyError:
            return os_type
    elif proto == "netconf":
        device_types = {
            "csr": "csr",
            "iosxr": "iosxr",
            "iosxe": "iosxe",
            "nxos": "nexus",
            "junos": "junos",
        }
        try:
            result = device_types[os_type]
        except KeyError:
            return "default"
    else:
        result = os_type

    return result