def METHOD_NAME(self, msg):
    try:
        new_val = pmt.to_python(pmt.cdr(msg))
        if type(new_val) == bool or type(new_val) == int:
            if type(new_val) == bool:
                super().setState(new_val)
            else:
                if new_val == 1:
                    super().setState(True)
                else:
                    super().setState(False)
        else:
            gr.log.error(
                "Value received was not an int or a bool: %s" % str(type(new_val)))
    except Exception as e:
        gr.log.error("Error with message conversion: %s" % str(e))