code: def generate_code(args):
      sys.setrecursionlimit(args.recursion_limit)
  
      with args.infile as f:
          pickle_lib = __import__(args.lib)
          model = pickle_lib.load(f)
  
      exporter, supported_args = LANGUAGE_TO_EXPORTER[args.language]
  
      kwargs = {}
      for arg_name in supported_args:
          arg_value = getattr(args, arg_name)
          if arg_value is not None:
              kwargs[arg_name] = arg_value
  
          # Special handling for the function_name parameter, which needs to be
          # the same as the default value of the keyword argument of the exporter
          # (this is due to languages like C# which prefer their method names to
          # follow PascalCase unlike all the other supported languages -- see
          # https://github.com/BayesWitnesses/m2cgen/pull/166#discussion_r379867601
          # for more).
          if arg_name == "function_name" and arg_value is None:
              param = signature(exporter).parameters["function_name"]
              kwargs[arg_name] = param.default
  
      return exporter(model, **kwargs)
  
file_path: m2cgen/m2cgen/cli.py
imports: import sys
  from argparse import ArgumentParser, FileType
  from inspect import signature
  import numpy
  import m2cgen
label_desc: Use image node_id 2 for calling a global function with example usage: generate_code(args) and returns: exporter