code: def set_tcp_flags(self, tcp_flags):
          
  
          if tcp_flags < 0 or tcp_flags > 255:
              raise ValueError("Invalid tcp_flags. Valid: 0-255.")
  
          prev_size = 0
          if self._json_dict.get('tcp_flags') is not None:
              prev_size = len(str(self._json_dict['tcp_flags'])) + len('tcp_flags') + 3  # str, key, key quotes, colon
  
          self._json_dict['tcp_flags'] = tcp_flags
  
          # 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
docs: Set the complete tcp flag bitmask