def _serialize_properties(self):
shift = <NUM_LIT:15><EOL>flag_bits = <NUM_LIT:0><EOL>flags = []<EOL>raw_bytes = AMQPWriter()<EOL>for key, proptype in self.PROPERTIES:<EOL><INDENT>val = self.properties.get(key, None)<EOL>if val is not None:<EOL><INDENT>if shift == <NUM_LIT:0>:<EOL><INDENT>flags.append(flag_bits)<EOL>flag_bits = <NUM_LIT:0><EOL>shift = <NUM_LIT:15><EOL><DEDENT>flag_bits |= (<NUM_LIT:1> << shift)<EOL>if proptype != '<STR_LIT>':<EOL><INDENT>getattr(raw_bytes, '<STR_LIT>' + proptype)(val)<EOL><DEDENT><DEDENT>shift -= <NUM_LIT:1><EOL><DEDENT>flags.append(flag_bits)<EOL>result = AMQPWriter()<EOL>for flag_bits in flags:<EOL><INDENT>result.write_short(flag_bits)<EOL><DEDENT>result.write(raw_bytes.getvalue())<EOL>return result.getvalue()<EOL>
serialize the 'properties' attribute (a dictionary) into
        the raw bytes making up a set of property flags and a
        property list, suitable for putting into a content frame header.