class_docstr: Generator for the gl2 (desktop) backend.
class_docstr_tok: ["Generator","for","the","gl2","(","desktop",")","backend","."]
code: def _write_argtypes(self, es2func):
      lines = self.lines
      ct_arg_types = [
          KNOWN_TYPES.get(arg.ctype, None) for arg in es2func.args
      ]
      # Set argument types on ctypes function
      if None in ct_arg_types:
          lines.append("# todo: unknown argtypes")
      elif es2func.group:
          lines.append("# todo: oops, dont set argtypes for group!")
      else:
          if ct_arg_types[1:]:
              argstr = ", ".join(
                  ["ctypes.%s" % t[1] for t in ct_arg_types[1:]]
              )
              lines.append(
                  "_lib.%s.argtypes = %s," % (es2func.glname, argstr)
              )
          else:
              lines.append("_lib.%s.argtypes = ()" % es2func.glname)
      # Set output arg (if available)
      if ct_arg_types[0][0] != type(None):
          lines.append(
              "_lib.%s.restype = ctypes.%s"
              % (es2func.glname, ct_arg_types[0][1])
          )
  
imports: from __future__ import annotations
  import os
  import sys
  import headerparser
  from annotations import parse_anotations
  from OpenGL import GL
label_desc: Use image node_id 2 for calling the Gl2ApiGenerator obj's underlying member method code with example usage: obj._write_argtypes(es2func) without return types