code: def convert_to_proto3(lines: Iterable[str]) -> Iterable[str]:
      for line in lines:
          # Set the syntax specifier
          m = PROTO_SYNTAX_REGEX.match(line)
          if m:
              yield m.group(1) + 'syntax = "proto3";'
              continue
  
          # Remove optional keywords
          m = OPTIONAL_REGEX.match(line)
          if m:
              yield m.group(1) + m.group(2)
              continue
  
          # Rewrite import
          m = IMPORT_REGEX.match(line)
          if m:
              yield m.group(1) + f'import "{m.group(2)}.proto3";'
              continue
  
          yield line
  
file_path: onnx/onnx/gen_proto.py
imports: import argparse
  import glob
  import os
  import re
  import subprocess
  from textwrap import dedent
  from typing import Iterable, Optional
label_desc: Use image node_id 3 for calling a global function with example usage: convert_to_proto3(lines) without return types