code: def _prepare_signal():
      """Register signal handler to test with
  
      Registers SIGUSR1 to raise KeyboardInterrupt where available
      """
      if hasattr(signal, "SIGUSR1"):
          signal.signal(signal.SIGUSR1, _raise_interrupt)
      # returns the remote value of the signal
      return int(TEST_SIGNAL)
  
imports: import asyncio
  import json
  import logging
  import os
  import signal
  import sys
  import tempfile
  import time
  from pathlib import Path
  from unittest import mock
  import pytest
  from traitlets.config import Config
  import ipyparallel
  from ipyparallel import cluster
  from ipyparallel.cluster.launcher import find_launcher_class
  from .clienttest import raises_remote
label_desc: Use image node_id 2 for calling a global function with example usage: _prepare_signal() and returns: int