code: def _send_bool(self,value):
          
  
          # Sanity check.
          if type(value) != bool and value not in [0,1]:
              err = "{} is not boolean.".format(value)
              raise ValueError(err)
  
          return struct.pack("?",value)
docs: Convert a boolean value into a bytes object.  Uses 0 and 1 as output.