def METHOD_NAME(request, submission_id):
    submission = get_submission_or_error(
        request, submission_id, TestRunProgramSubmission
    )
    data = submission.input_file.read(get_preview_size_limit())
    data, decode_error = decode_str(data)
    size = submission.input_file.size
    download_url = reverse(
        'download_testrun_input',
        kwargs={'contest_id': request.contest.id, 'submission_id': submission_id},
    )
    return TemplateResponse(
        request,
        'testrun/data.html',
        {
            'header': _("Input"),
            'data': data,
            'left': size - get_preview_size_limit(),
            'decode_error': decode_error,
            'download_url': download_url,
        },
    )