code: def runmain(lexer=None, data=None):
      if not data:
          try:
              filename = sys.argv[1]
              with open(filename) as f:
                  data = f.read()
          except IndexError:
              sys.stdout.write(
                  "Reading from standard input (type EOF to end):\n"
              )
              data = sys.stdin.read()
  
      if lexer:
          _input = lexer.input
      else:
          _input = input
      _input(data)
      if lexer:
          _token = lexer.token
      else:
          _token = token
  
      while True:
          tok = _token()
          if not tok:
              break
          sys.stdout.write(
              "(%s,%r,%d,%d)\n"
              % (tok.type, tok.value, tok.lineno, tok.lexpos)
          )
  
imports: import re
  import sys
  import types
  import copy
  import os
  import inspect
label_desc: Use image node_id 8 for calling a global function with example usage: runmain(lexer, data) without return types