code: def capture(
      capture_type, game_name, interval=1, extra=None, extra_2=None
  ):
      game = initialize_game(game_name)
      game.launch(dry_run=True)
  
      if capture_type not in ["frame", "context", "region"]:
          raise Exception("Invalid capture command.")
  
      if capture_type == "frame":
          game.play(
              frame_handler="COLLECT_FRAMES", interval=float(interval)
          )
      elif capture_type == "context":
          game.play(
              frame_handler="COLLECT_FRAMES_FOR_CONTEXT",
              interval=float(interval),
              context=extra,
              screen_region=extra_2,
          )
      elif capture_type == "region":
          game.play(
              frame_handler="COLLECT_FRAME_REGIONS",
              interval=float(interval),
              region=extra,
          )
  
imports: import os
  import sys
  import shutil
  import subprocess
  import shlex
  import time
  import offshoot
  from serpent.utilities import clear_terminal, display_serpent_logo, is_linux, is_windows, wait_for_crossbar
  from serpent.window_controller import WindowController
label_desc: Use image node_id 20 for calling a global function with example usage: capture(capture_type, game_name, interval, extra, extra_2) without return types