def handle_module_upgrade_request(controller, module_id, pipeline):
    def add_keyname(fname, module):
        new_function = controller.create_function(module,
                                                  "key_name",
                                                  ["_key"])
        return [('add', new_function, 'module', module.id)]

    module_remap = {
            'read|csv|CSVFile': [
                (None, '0.1.1', 'read|CSVFile', {
                    'src_port_remap': {
                        'self': 'value'},
                })
            ],
            'read|numpy|NumPyArray': [
                (None, '0.1.1', 'read|NumPyArray', {
                    'src_port_remap': {
                        'self': 'value'},
                })
            ],
            'read|CSVFile': [
                ('0.1.1', '0.1.2', None, {
                    'src_port_remap': {
                        'self': 'value'},
                }),
                ('0.1.3', '0.1.5', None, {})
            ],
            'read|NumPyArray': [
                ('0.1.1', '0.1.2', None, {
                    'src_port_remap': {
                        'self': 'value'},
                })
            ],
            'read|ExcelSpreadsheet': [
                ('0.1.1', '0.1.2', None, {
                    'src_port_remap': {
                        'self': 'value'},
                }),
                ('0.1.3', '0.1.4', None, {})
            ],
            'read|JSONFile': [
                (None, '0.1.5', 'read|JSONObject', {
                    'function_remap': {
                        None: add_keyname},
                })
            ],
        }

    try:
        from vistrails.packages.spreadsheet.init import upgrade_cell_to_output
    except __HOLE__:
        pass
    else:
        module_remap = upgrade_cell_to_output(
                module_remap, module_id, pipeline,
                'TableCell', 'TableOutput',
                '0.1.6', 'table')

    return UpgradeWorkflowHandler.remap_module(controller,
                                               module_id,
                                               pipeline,
                                               module_remap)
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/packages/tabledata/init.py/handle_module_upgrade_request