code: def encode(self):
          
  
          match_id = self.match_id
          if match_id is None:
              match_id = (1 << 11) - 1
  
          return (self.match_type << 12) | DataStreamSelector.SpecifierEncodings[self.match_spec] | match_id
docs: Encode this stream as a packed 16-bit unsigned integer.
  
          Returns:
              int: The packed encoded stream