code: def send_close(self, status=STATUS_NORMAL, reason=six.b("")):
          
          if status < 0 or status >= ABNF.LENGTH_16:
              raise ValueError("code is invalid range")
          self.connected = False
          self.send(struct.pack('!H', status) + reason, ABNF.OPCODE_CLOSE)
docs: send close data to the server.
  
          status: status code to send. see STATUS_XXX.
  
          reason: the reason to close. This must be string or bytes.