code: def add_windows_ctrl_c():
      def handler(a, b=None):  # pylint: disable=unused-argument
          sys.exit(1)
  
      add_windows_ctrl_c.is_handler_installed = vars(
          add_windows_ctrl_c
      ).setdefault("is_handler_installed", False)
      if (
          sys.platform == "win32"
          and not add_windows_ctrl_c.is_handler_installed
      ):
          if sys.stdin is not None and sys.stdin.isatty():
              # this is Console based application
              import win32api
  
              win32api.SetConsoleCtrlHandler(handler, True)
          # else do not install handler for non-console applications
          add_windows_ctrl_c.is_handler_installed = True
  
imports: import numpy
  import math
  import time
  import sys
  import os
  import inspect
  import re
  import uuid
  from collections import abc
  import textwrap
  from functools import wraps
  import gc
  import timeit
label_desc: Use image node_id 24 for calling a global function with example usage: add_windows_ctrl_c() without return types