<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def device_typename(item):
 """ Convert the old names to new-style names and types :param str item: A device in the form of 'TYPE NAME' :return: tuple containing device name and type details """


        dev_type = {'ROUTER': {'from': 'ROUTER',
                               'desc': 'Router',
                               'type': 'Router',
                               'label_x': 19.5},
                    'QEMU': {'from': 'QEMU',
                             'desc': 'QEMU VM',
                             'type': 'QemuVM',
                             'ext_conf': 'QemuDevice',
                             'label_x': -12},
                    'ASA': {'from': 'ASA',
                            'desc': 'QEMU VM',
                            'type': 'QemuVM',
                            'ext_conf': '5520',
                            'label_x': 2.5},
                    'PIX': {'from': 'PIX',
                            'desc': 'QEMU VM',
                            'type': 'QemuVM',
                            'ext_conf': '525',
                            'label_x': -12},
                    'JUNOS': {'from': 'JUNOS',
                              'desc': 'QEMU VM',
                              'type': 'QemuVM',
                              'ext_conf': 'O-series',
                              'label_x': -12},
                    'IDS': {'from': 'IDS',
                            'desc': 'QEMU VM',
                            'type': 'QemuVM',
                            'ext_conf': 'IDS-4215',
                            'label_x': -12},
                    'VBOX': {'from': 'VBOX',
                             'desc': 'VirtualBox VM',
                             'type': 'VirtualBoxVM',
                             'ext_conf': 'VBoxDevice',
                             'label_x': -4.5},
                    'FRSW': {'from': 'FRSW',
                             'desc': 'Frame Relay switch',
                             'type': 'FrameRelaySwitch',
                             'label_x': 7.5},
                    'ETHSW': {'from': 'ETHSW',
                              'desc': 'Ethernet switch',
                              'type': 'EthernetSwitch',
                              'label_x': 15.5},
                    'Hub': {'from': 'Hub',
                            'desc': 'Ethernet hub',
                            'type': 'EthernetHub',
                            'label_x': 12.0},
                    'ATMSW': {'from': 'ATMSW',
                              'desc': 'ATM switch',
                              'type': 'ATMSwitch',
                              'label_x': 2.0},
                    'ATMBR': {'from': 'ATMBR',  # TODO: Investigate ATM Bridge
                              'desc': 'ATMBR',
                              'type': 'ATMBR'},
                    'Cloud': {'from': 'Cloud',
                              'desc': 'Cloud',
                              'type': 'Cloud',
                              'label_x': 47.5}}

        item_type = item.split(' ')[0]
        name = item.replace('%s ' % dev_type[item_type]['from'], '')
        return name, dev_type[item_type]