code: def next_type_name(file: str, start: int) -> str:
      """
      Find the name of the next struct definition in a go file starting at a given line.
  
      It is pretty dumb and only matches type definitions of the form:
  
          ^type Thing .*
  
      This is how we decide which type definition to operate on after the //go:generate comments.
      """
      with open(file) as f:
          for lineno, line in enumerate(f.readlines()):
              if lineno < start:
                  continue
              match = re.match("type ([\\S]+) ", line)
              if match is not None:
                  return match[1]
      raise AssertionError(
          f"did not find a type definition in {file} after line {start}"
      )
  
imports: import argparse
  import json
  import os
  import re
  import sys
  from typing import List, Optional, Tuple
label_desc: Use image node_id 5 for calling a global function with example usage: next_type_name(file, start) and returns: match