code: def close(self) -> None:
          
          if self.close_task is None:
              self.close_task = self.loop.create_task(self._close())
docs: Close the server and terminate connections with close code 1001.
  
          This method is idempotent.