def METHOD_NAME(channel, method, properties, body):
    """Gets called when messages arrive in the GENERATE_QUEUE
    :param channel: Object to make further modifications like adding queues, publishing, etc.
    :type channel: pika.channel.Channel
    :param method: Details on how the data was passed to the queue
    :type method: pika.spec.Basic.Deliver
    :param properties: Additional data used for replying and correlating messages
    :type properties: pika.spec.BasicProperties
    :param body: Request data that's passed to the PDF for generation
    :type body: bytes
    """
    try:
        redis_client = RedisClient(redis_config)
        pdf_generator = PDFGenerator(pdf_options)
        message = json.loads(body)
        claim_id = message["claimSubmissionId"]
        diagnosis_code = message["diagnosticCode"]
        message["veteran_info"] = message["veteranInfo"]
        pdf_template = message['pdfTemplate']
        try:
            template_name = codes[diagnosis_code] + "-" + pdf_template
            diagnosis_name = codes[diagnosis_code]
        except KeyError:
            template_name = "default"
            diagnosis_name = "default"
        variables = pdf_generator.generate_template_variables(template_name, message)
        template = pdf_generator.generate_template_file(template_name, variables)
        pdf = pdf_generator.generate_pdf_from_string(template_name, template, variables)
        redis_client.save_hash_data(f"{claim_id}-pdf", mapping={"contents": base64.b64encode(pdf).decode("ascii"), "diagnosis": diagnosis_name})
        logging.info(f"Claim {claim_id}: Saved PDF")
        # Check if the routing key is for a generate or generate and fetch
        if method.routing_key == "generate-pdf":
            response = {"claimSubmissionId": claim_id, "status": "COMPLETE"}
        else:
            pdf = redis_client.get_hash_data(f"{claim_id}-pdf", "contents")
            diagnosis_name = redis_client.get_hash_data(f"{claim_id}-pdf", "diagnosis")
            logging.info("Fetched PDF")
            response = {"claimSubmissionId": claim_id, "status": "COMPLETE", "diagnosis": str(diagnosis_name.decode("ascii")), "pdfData": str(pdf.decode("ascii"))}
    except Exception as e:
        logging.error(e, exc_info=True)
        response = {"claimSubmissionId": claim_id, "status": "ERROR", "reason": str(e)}
    channel.basic_publish(exchange=EXCHANGE, routing_key=properties.reply_to, properties=pika.BasicProperties(correlation_id=properties.correlation_id), body=json.dumps(response))