code: def write_uop(
      uop: Part,
      out: CWriter,
      offset: int,
      stack: Stack,
      inst: Instruction,
      braces: bool,
  ) -> int:
      # out.emit(stack.as_comment() + "\n")
      if isinstance(uop, Skip):
          entries = "entries" if uop.size > 1 else "entry"
          out.emit(f"/* Skip {uop.size} cache {entries} */\n")
          return offset + uop.size
      try:
          out.start_line()
          if braces:
              out.emit(f"// {uop.name}\n")
          for var in reversed(uop.stack.inputs):
              out.emit(stack.pop(var))
          if braces:
              out.emit("{\n")
          if not uop.properties.stores_sp:
              for i, var in enumerate(uop.stack.outputs):
                  out.emit(stack.push(var))
          for cache in uop.caches:
              if cache.name != "unused":
                  if cache.size == 4:
                      type = "PyObject *"
                      reader = "read_obj"
                  else:
                      type = f"uint{cache.size*16}_t "
                      reader = f"read_u{cache.size*16}"
                  out.emit(
                      f"{type}{cache.name} = {reader}(&this_instr[{offset}].cache);\n"
                  )
              offset += cache.size
          emit_tokens(out, uop, stack, inst)
          if uop.properties.stores_sp:
              for i, var in enumerate(uop.stack.outputs):
                  out.emit(stack.push(var))
          if braces:
              out.start_line()
              out.emit("}\n")
          # out.emit(stack.as_comment() + "\n")
          return offset
      except SizeMismatch as ex:
          raise analysis_error(ex.args[0], uop.body[0])
  
file_path: cpython/Tools/cases_generator/tier1_generator.py
imports: import argparse
  import os.path
  import sys
  from analyzer import Analysis, Instruction, Uop, Part, analyze_files, Skip, StackItem, analysis_error
  from generators_common import DEFAULT_INPUT, ROOT, write_header, emit_tokens
  from cwriter import CWriter
  from typing import TextIO, Iterator
  from lexer import Token
  from stack import StackOffset, Stack, SizeMismatch
label_desc: Use image node_id 2 for calling a global function with example usage: write_uop(uop, out, offset, stack, inst, braces) and returns: unknown, offset