code: def code_generation() -> (
      Iterator[
          Tuple[
              plugin_pb2.CodeGeneratorRequest,
              plugin_pb2.CodeGeneratorResponse,
          ],
      ]
  ):
      if len(sys.argv) > 1 and sys.argv[1] in ("-V", "--version"):
          print("mypy-protobuf " + __version__)
          sys.exit(0)
  
      # Read request message from stdin
      data = sys.stdin.buffer.read()
  
      # Parse request
      request = plugin_pb2.CodeGeneratorRequest()
      request.ParseFromString(data)
  
      # Create response
      response = plugin_pb2.CodeGeneratorResponse()
  
      # Declare support for optional proto3 fields
      response.supported_features |= (
          plugin_pb2.CodeGeneratorResponse.FEATURE_PROTO3_OPTIONAL
      )
  
      yield request, response
  
      # Serialise response message
      output = response.SerializeToString()
  
      # Write to stdout
      sys.stdout.buffer.write(output)
  
imports: from __future__ import annotations
  import sys
  from collections import defaultdict
  from contextlib import contextmanager
  from typing import Any, Callable, Dict, Iterable, Iterator, List, Optional, Set, Sequence, Tuple
  import google.protobuf.descriptor_pb2
  from google.protobuf.compiler import plugin_pb2
  from google.protobuf.internal.containers import RepeatedCompositeFieldContainer
  from google.protobuf.internal.well_known_types import WKTBASES
  from .None import extensions_pb2
label_desc: Use image node_id 5 for calling a global function with example usage: code_generation() without return types