@staticmethod
def _get_rcode_value_from_flags(flags: int) ->int:
    """
        Retrieve the rcode value from flags.

        :param flags: an integer representing the flags of a dns message
        :return: value of the rcode field as int
        """
    return flags & int.from_bytes(b'\x00\x00\x00\x0f', 'big')
