def handle_packets(pk):
log.info(("<STR_LIT>")<EOL>.format(pub))<EOL>eth = pk.getlayer(kamene.Ether)<EOL>should_forward = False<EOL>send_msg = {"<STR_LIT:data>": {},<EOL>"<STR_LIT>": rnow(),<EOL>"<STR_LIT:source>": SOURCE}<EOL>if eth:<EOL><INDENT>send_msg["<STR_LIT:data>"] = convert_pkt_to_json(eth)<EOL>should_forward = True<EOL><DEDENT>else:<EOL><INDENT>log.error(("<STR_LIT>")<EOL>.format(pk))<EOL><DEDENT>if should_forward:<EOL><INDENT>log.info("<STR_LIT>")<EOL>msg_sent = pub.publish(body=send_msg,<EOL>exchange=FORWARD_EXCHANGE,<EOL>routing_key=FORWARD_ROUTING_KEY,<EOL>queue=FORWARD_QUEUE,<EOL>serializer="<STR_LIT>",<EOL>retry=True)<EOL>log.info("<STR_LIT>".format(msg_sent))<EOL><DEDENT>
handle_packets

    :param pk: data packet that kamene sends in