human
Complete this python program:
def import_workflow_from_hue_3_7(old_wf):
assistant
#Here is the Python program you requested.

    """Example of data to transform
    [<Start: start>, <Pig: Pig>, [<Kill: kill>], [<End: end>]]
    [<Start: start>, <Java: TeraGenWorkflow>, <Java: TeraSort>, [<Kill: kill>], [<End: end>]]
    [<Start: start>, [<Fork: fork-34>, [[<Mapreduce: Sleep-1>, <Mapreduce: Sleep-10>], [<Mapreduce: Sleep-5>, [<Fork: fork-38>, [[<Mapreduce: Sleep-3>], [<Mapreduce: Sleep-4>]], <Join: join-39>]]], <Join: join-35>], [<Kill: kill>], [<End: end>]]
    """
    uuids = {}
    old_nodes = old_wf.get_hierarchy()
    wf = Workflow()
    wf_rows = []
    wf_nodes = []
    data = wf.get_data()
    for node in old_wf.node_list:
        if (node.name == 'kill'):
            node_uuid = '17c9c895-5a16-7443-bb81-f34b30b21548'
        elif (node.name == 'start'):
            node_uuid = '3f107997-04cc-8733-60a9-a4bb62cebffc'
        elif (node.name == 'end'):
            node_uuid = '33430f0f-ebfa-c3ec-f237-3e77efa03d0a'
        else:
            node_uuid = str(uuid.uuid4())
        uuids[node.id] = node_uuid
    data['workflow']['uuid'] = str(uuid.uuid4())
    data['workflow']['name'] = old_wf.name
    data['workflow']['properties']['properties'] = json.loads(old_wf.job_properties)
    data['workflow']['properties']['job_xml'] = old_wf.job_xml
    data['workflow']['properties']['description'] = old_wf.description
    data['workflow']['properties']['schema_version'] = old_wf.schema_version
    data['workflow']['properties']['deployment_dir'] = old_wf.deployment_dir
    data['workflow']['properties']['parameters'] = json.loads(old_wf.parameters)
    data['workflow']['properties']['description'] = old_wf.description
    data['workflow']['properties']['sla'] = old_wf.sla
    data['workflow']['properties']['sla_enabled'] = old_wf.sla_enabled
    data['workflow']['properties']['imported'] = True
    data['workflow']['properties']['wf1_id'] = old_wf.id
    rows = data['layout'][0]['rows']
    def _create_layout(nodes, size=12):
        wf_rows = []
        for node in nodes:
            if ((type(node) == list) and (len(node) == 1)):
                node = node[0]
            if (type(node) != list):
                wf_rows.append({'widgets': [{'size': size, 'name': node.name.title(), 'id': uuids[node.id], 'widgetType': ('%s-widget' % node.node_type), 'properties': {}, 'offset': 0, 'isLoading': False, 'klass': ('card    card-widget    span%s' % size), 'columns': []}]})
            elif (node[0].node_type == 'fork'):
                wf_rows.append({'widgets': [{'size': size,...