<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def write_bit(self, b, pack=Struct('B').pack):
        '''
        Write a single bit. Convenience method for single bit args.
        '''
        self._output_buffer.append(pack(True if b else False))
        return self