code: def err(msg, die=None):
      """Print an error message and exits if an exit code is given"""
      sys.stderr.write(msg + "\n")
      if die:
          sys.exit(die if isinstance(die, int) else 1)
  
file_path: pelican/pelican/tools/pelican_themes.py
imports: import argparse
  import os
  import shutil
  import sys
label_desc: Use image node_id 1 for calling a global function with example usage: err(msg, die) without return types