def get_item_from_queue(Q, timeout=<NUM_LIT>):
try:<EOL><INDENT>item = Q.get(True, <NUM_LIT>)<EOL><DEDENT>except queue.Empty:<EOL><INDENT>return None<EOL><DEDENT>return item<EOL>
Attempts to retrieve an item from the queue Q. If Q is
        empty, None is returned.

        Blocks for 'timeout' seconds in case the queue is empty,
        so don't use this method for speedy retrieval of multiple
        items (use get_all_from_queue for that).