code: def _schema():
      root = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
      third_party_dir = os.path.join(
          root, "third_party", "source", "nnabla"
      )
      tmpl_file = os.path.join(
          third_party_dir, "src/nbla/proto/nnabla.proto.tmpl"
      )
      yaml_functions_path = os.path.join(
          third_party_dir, "build-tools/code_generator/functions.yaml"
      )
      yaml_solvers_path = os.path.join(
          third_party_dir, "build-tools/code_generator/solvers.yaml"
      )
      functions = _read_yaml(yaml_functions_path)
      function_info = {
          k: v
          for _, category in functions.items()
          for k, v in category.items()
      }
      solver_info = _read_yaml(yaml_solvers_path)
      path = tmpl_file.replace(".tmpl", "")
      template = mako.template.Template(
          text=None, filename=tmpl_file, preprocessor=None
      )
      content = template.render(
          function_info=function_info, solver_info=solver_info
      )
      content = content.replace("\r\n", "\n").replace("\r", "\n")
      _write(path, content)
  
file_path: netron/tools/nnabla_script.py
imports: import json
  import sys
  import os
  import yaml
  import mako.template
label_desc: Use image node_id 4 for calling a global function with example usage: _schema() without return types