code: async def close(self, *, timeout=None):
          
          try:
              if not self.is_closed():
                  await self._protocol.close(timeout)
          except Exception:
              # If we fail to close gracefully, abort the connection.
              self._abort()
              raise
          finally:
              self._cleanup()
docs: Close the connection gracefully.
  
          :param float timeout:
              Optional timeout value in seconds.
  
          .. versionchanged:: 0.14.0
             Added the *timeout* parameter.