code: def _export_csrc_example(self, dirname, name, prefix):
      includes = []
      includes.append('#include "{}_inference.h"'.format(name))
      if len(self._info._parameters) > 0:
          allocate = "void *context = {}_allocate_context({}_parameters);".format(
              prefix, name
          )
          includes.append('#include "{}_parameters.h"'.format(name))
      else:
          allocate = "void *context = {}_allocate_context(0);".format(
              prefix
          )
  
      prepare_input_file = []
      for n in range(self._info._num_of_inputs):
          prepare_input_file.append(
              '    FILE* input{} = fopen(argv[{}], "rb");'.format(
                  n, n + 1
              )
          )
          prepare_input_file.append("    assert(input{});".format(n))
          prepare_input_file.append(
              "    int input_read_size{2} = fread({0}_input_buffer(context, {2}), sizeof(float), {1}_INPUT{2}_SIZE, input{2});".format(
                  prefix, prefix.upper(), n
              )
          )
          prepare_input_file.append(
              "    assert(input_read_size{1} == {0}_INPUT{1}_SIZE);".format(
                  prefix.upper(), n
              )
          )
          prepare_input_file.append("    fclose(input{});".format(n))
          prepare_input_file.append("")
  
      prepare_output_file = []
      pos = self._info._num_of_inputs
      for n in range(self._info._num_of_outputs):
          prepare_output_file.append(
              "    char* output_filename{} = malloc(strlen(argv[{}]) + 10);".format(
                  n, pos + 1
              )
          )
          prepare_output_file.append(
              '    sprintf(output_filename{0}, "%s_{0}.bin", argv[{1}]);'.format(
                  n, pos + 1
              )
          )
          prepare_output_file.append(
              '    FILE* output{0} = fopen(output_filename{0}, "wb");'.format(
                  n
              )
          )
          prepare_output_file.append("    assert(output{});".format(n))
          prepare_output_file.append(
              "    int output_write_size{2} = fwrite({0}_output_buffer(context, {2}), sizeof(float), {1}_OUTPUT{2}_SIZE, output{2});".format(
                  prefix, prefix.upper(), n
              )
          )
          prepare_output_file.append(
              "    assert(output_write_size{1} == {0}_OUTPUT{1}_SIZE);".format(
                  prefix.upper(), n
              )
          )
          prepare_output_file.append("    fclose(output{});".format(n))
          prepare_output_file.append(
              "    free(output_filename{});".format(n)
          )
          prepare_output_file.append("")
  
      example = csrc_example.format(
          name=name,
          prefix=prefix,
          prefix_upper=prefix.upper(),
          includes="\n".join(includes),
          allocate=allocate,
          num_of_input_buffers=self._info._num_of_inputs,
          prepare_input_file="\n".join(prepare_input_file),
          prepare_output_file="\n".join(prepare_output_file),
      )
  
      example_filename = os.path.join(
          dirname, "{}_example.c".format(name)
      )
      with open(example_filename, "w") as f:
          f.write(example)
  
file_path: nnabla/python/src/nnabla/utils/converter/nnablart/csrc.py
imports: import os
  import nnabla.utils.converter
  from .csrc_templates import csrc_parameters_defines, csrc_parameters_implements, csrc_defines, csrc_implements, csrc_example, csrc_gnumake
  from .utils import create_nnabart_info
  from .utils import preprocess_for_exporter
label_desc: Use image node_id 5 for calling the CsrcExporter obj's underlying member method code with example usage: obj._export_csrc_example(dirname, name, prefix) without return types