Incorrect use of Process.terminate API
If a process that uses shared resources is terminated using `Process.terminate()`, then an exception might be thrown when another process attempts to use those shared resources.
def put_object_to_queue_noncompliant(queue):
    try:
        queue.put([42, None, 'hello'])
    finally:
        queue.task_done()


def shared_queue_noncompliant():
    from multiprocessing.context import Process
    from multiprocessing.queues import Queue
    queue = Queue()
    process = Process(target=put_object_to_queue_noncompliant, args=(queue,))
    process.start()
    print(queue.get())  # prints "[42, None, 'hello']"
    # Noncompliant: uses 'Process.terminate' API on shared resources making
    # queue liable to become corrupted and may become unusable by other process
    process.terminate()
    # trying to access corrupt queue
    queue.put([50, None, 'hello'])
def put_object_to_queue_compliant(queue):
    try:
        queue.put([42, None, 'hello'])
    finally:
        queue.task_done()


def shared_queue_compliant():
    from multiprocessing.context import Process
    from multiprocessing.queues import Queue
    queue = Queue()
    process = Process(target=put_object_to_queue_compliant, args=(queue,))
    process.start()
    print(queue.get())  # prints "[42, None, 'hello']"
    # Compliant: avoids using 'Process.terminate' API on shared resources
    # making the queue accessible.
    queue.join()
    # accessing safe queue object
    queue.put([50, None, 'hello'])