def add_init_input_lines(init_inputs, input_param, may_be_missing):
    if input_param["class"] in class_to_dxclass:
        init_str = "{name} = {dxclass}({name})".format(name=input_param["name"],
                                                       dxclass=class_to_dxclass[input_param["class"]])
    elif input_param["class"].startswith("array:") and input_param["class"][6:] in class_to_dxclass:
        init_str = "{name} = [{dxclass}(item) for item in {name}]".format(name=input_param["name"],
                                                                          dxclass=class_to_dxclass[input_param["class"][6:]])
    else:
        init_str = None

    if init_str is not None:
        if may_be_missing:
            init_inputs.append("if {name} is not None:".format(name=input_param['name']))
            indent = '    '
        else:
            indent = ''
        init_inputs.append(indent + init_str)
dataset/ETHPy150Open dnanexus/dx-toolkit/src/python/dxpy/templating/python.py/add_init_input_lines/original