code: def _serialize_result_and_send(socket, serializer, data):
      # Result message is a tuple containing data payload and possible exception (or None).
      socket.send_multipart(
          [serializer.serialize(data), pickle.dumps(None)]
      )
  
imports: import logging
  import pickle
  import sys
  import os
  from time import sleep, time
  from traceback import format_exc
  from threading import Thread
  from psutil import pid_exists
  import zmq
  from zmq import ZMQBaseError
  from petastorm.reader_impl.pickle_serializer import PickleSerializer
  from petastorm.workers_pool import EmptyResultError, VentilatedItemProcessedMessage
  from petastorm.workers_pool.exec_in_new_process import exec_in_new_process
label_desc: Use image node_id 2 for calling a global function with example usage: _serialize_result_and_send(socket, serializer, data) without return types