code: def generate_opcode_metadata(
      filenames: list[str], analysis: Analysis, outfile: TextIO
  ) -> None:
      write_header(__file__, filenames, outfile)
      out = CWriter(outfile, 0, False)
      with out.header_guard("Py_CORE_OPCODE_METADATA_H"):
          out.emit("#ifndef Py_BUILD_CORE\n")
          out.emit(
              '#  error "this header requires Py_BUILD_CORE define"\n'
          )
          out.emit("#endif\n\n")
          out.emit("#include <stdbool.h>              // bool\n")
          out.emit('#include "opcode_ids.h"\n')
          generate_is_pseudo(analysis, out)
          out.emit('#include "pycore_uop_ids.h"\n')
          generate_stack_effect_functions(analysis, out)
          generate_instruction_formats(analysis, out)
          table_size = 256 + len(analysis.pseudos)
          out.emit("#define IS_VALID_OPCODE(OP) \\\n")
          out.emit(f"    (((OP) >= 0) && ((OP) < {table_size}) && \\\n")
          out.emit(
              "     (_PyOpcode_opcode_metadata[(OP)].valid_entry))\n\n"
          )
          generate_flag_macros(out)
          generate_oparg_macros(out)
          generate_metadata_table(analysis, out)
          generate_expansion_table(analysis, out)
          generate_name_table(analysis, out)
          generate_cache_table(analysis, out)
          generate_deopt_table(analysis, out)
          generate_extra_cases(analysis, out)
          generate_pseudo_targets(analysis, out)
  
imports: import argparse
  import os.path
  import sys
  from analyzer import Analysis, Instruction, analyze_files, Skip, Uop
  from generators_common import DEFAULT_INPUT, ROOT, write_header, cflags, StackOffset
  from cwriter import CWriter
  from typing import TextIO
  from stack import get_stack_effect
label_desc: Use image node_id 16 for calling a global function with example usage: generate_opcode_metadata(filenames, analysis, outfile) without return types