Add a single TCP flag - will be OR'd into the existing bitmask

def add_tcp_flag(self, tcp_flag):
        """Add a single TCP flag - will be OR'd into the existing bitmask"""

        if tcp_flag not in [1, 2, 4, 8, 16, 32, 64, 128]:
            raise ValueError("Invalid TCP flag. Valid: [1, 2, 4, 8, 16,32, 64, 128]")

        prev_size = 0

        if self._json_dict.get('tcp_flags') is None:
            self._json_dict['tcp_flags'] = 0
        else:
            prev_size = len(str(self._json_dict['tcp_flags'])) + len('tcp_flags') + 3  # str, key, key quotes, colon
        self._json_dict['tcp_flags'] |= tcp_flag

        # update size
        new_size = len(str(self._json_dict['tcp_flags'])) + len('tcp_flags') + 3  # str, key, key quotes, colon
        self._size += new_size - prev_size

        if prev_size == 0 and self._has_field:
            # add the comma and space
            self._size += 2
        self._has_field = True