

def get_strings(app_json, required_file_input_names, optional_file_input_names, required_file_array_input_names, optional_file_array_input_names, file_output_names, dummy_output_hash):
    input_sig_str = ''
    init_inputs_str = ''
    dl_files_str = ''
    ul_files_str = ''
    outputs_str = ''
    args_list = []
    kwargs_list = []
    init_inputs = []
    if ('inputSpec' in app_json):
        for input_param in app_json['inputSpec']:
            may_be_missing = (input_param.get('optional') and ('default' not in input_param))
            if may_be_missing:
                kwargs_list.append(input_param['name'])
            else:
                args_list.append(input_param['name'])
            add_init_input_lines(init_inputs, input_param, may_be_missing)
        input_sig_str = ', '.join((args_list + [(name + '=None') for name in kwargs_list]))
    else:
        input_sig_str = '**kwargs'
    if init_inputs:
        init_inputs_str = ('\n' + fill('The following line(s) initialize your data object inputs on the platform into dxpy.DXDataObject instances that you can start using immediately.', initial_indent='    # ', subsequent_indent='    # ', width=80))
        init_inputs_str += '\n\n    '
        init_inputs_str += '\n    '.join(init_inputs)
        init_inputs_str += '\n'
    if (required_file_input_names or optional_file_input_names or required_file_array_input_names or optional_file_array_input_names):
        dl_files_str = (('\n' + fill('The following line(s) download your file inputs to the local file system using variable names for the filenames.', initial_indent='    # ', subsequent_indent='    # ', width=80)) + '\n\n')
        if required_file_input_names:
            dl_files_str += '\n'.join(['    dxpy.download_dxfile({name}.get_id(), "{name}")\n'.format(name=name) for name in required_file_input_names])
        if optional_file_input_names:
            dl_files_str += '\n'.join(['    if {name} is not None:\n        dxpy.download_dxfile({name}.get_id(), "{name}")\n'.format(name=name) for name in optional_file_input_names])
        if required_file_array_input_names:
            dl_files_str += '\n'.join(['    for i, f in enumerate({name}):\n        dxpy.download_dxfile(f.get_id(), "{name}-" + str(i))\n'.format(name=name) for name in required_file_array_input_names])
        if optional_file_array_input_names:
            dl_files_str += '\n'.join(['    if {name} is not None:\n        for i, f in enumerate({name}):\n            dxpy.download_dxfile(f.get_id(), "{name}-" + str(i))\n'.format(name=name) for name in optional_file_array_input_names])
    if file_output_names:
        ul_files_str = ('\n' + fill('The following line(s) use the Python bindings to upload your file outputs after you have created them on the local file system.  It assumes that you have used the output field name for the filename for each output, but you can change that behavior to suit your needs.', initial_indent='    # ', subsequent_indent='    # ', width=80))
        ul_files_str += '\n\n    '
        ul_files_str += ('\n    '.join(['{name} = dxpy.upload_local_file("{name}")'.format(name=name) for name in file_output_names]) + '\n')
    if (('outputSpec' in app_json) and app_json['outputSpec']):
        outputs_str = (('    ' + '\n    '.join(['output["{name}"] = {value}'.format(name=param['name'], value=get_output_fmt(param)) for param in app_json['outputSpec']])) + '\n')
    return (input_sig_str, init_inputs_str, dl_files_str, ul_files_str, outputs_str)

dataset/ETHPy150Open dnanexus/dx-toolkit/src/python/dxpy/templating/python.py get_strings/original