code: def put_code(self, output):
      code = output["utility_code_def"]
      proto_code = output["utility_code_proto"]
      env = output.module_node.scope
      cython_scope = env.context.cython_scope
  
      # Search all types for __getbuffer__ overloads
      types = []
      visited_scopes = set()
  
      def find_buffer_types(scope):
          if scope in visited_scopes:
              return
          visited_scopes.add(scope)
          for m in scope.cimported_modules:
              find_buffer_types(m)
          for e in scope.type_entries:
              if isinstance(
                  e.utility_code_definition, CythonUtilityCode
              ):
                  continue
              t = e.type
              if t.is_extension_type:
                  if scope is cython_scope and not e.used:
                      continue
                  release = get = None
                  for x in t.scope.pyfunc_entries:
                      if x.name == "__getbuffer__":
                          get = x.func_cname
                      elif x.name == "__releasebuffer__":
                          release = x.func_cname
                  if get:
                      types.append((t.typeptr_cname, get, release))
  
      find_buffer_types(env)
  
      util_code = TempitaUtilityCode.load(
          "GetAndReleaseBuffer",
          from_file="Buffer.c",
          context=dict(types=types),
      )
  
      proto = util_code.format_code(util_code.proto)
      impl = util_code.format_code(
          util_code.inject_string_constants(util_code.impl, output)[1]
      )
  
      proto_code.putln(proto)
      code.putln(impl)
  
imports: from __future__ import absolute_import
  from .Visitor import CythonTransform
  from .ModuleNode import ModuleNode
  from .Errors import CompileError
  from .UtilityCode import CythonUtilityCode
  from .Code import UtilityCode, TempitaUtilityCode
  from .None import Options
  from .None import Interpreter
  from .None import PyrexTypes
  from .None import Naming
  from .None import Symtab
label_desc: Use image node_id 5 for calling the GetAndReleaseBufferUtilityCode obj's underlying member method code with example usage: obj.put_code(output) without return types