async def connect(self):
with async_timeout.timeout(self.timeout):<EOL><INDENT>self.response = await self._connect()<EOL><DEDENT>if self.response.status in range(<NUM_LIT:200>, <NUM_LIT>):<EOL><INDENT>self._error_timeout = <NUM_LIT:0><EOL>self.state = NORMAL<EOL><DEDENT>elif self.response.status == <NUM_LIT>:<EOL><INDENT>self.state = DISCONNECTION<EOL><DEDENT>elif self.response.status in range(<NUM_LIT>, <NUM_LIT>):<EOL><INDENT>self.state = RECONNECTION<EOL><DEDENT>elif self.response.status in (<NUM_LIT>, <NUM_LIT>):<EOL><INDENT>self.state = ENHANCE_YOUR_CALM<EOL><DEDENT>else:<EOL><INDENT>logger.debug("<STR_LIT>")<EOL>raise await exceptions.throw(self.response,<EOL>loads=self.client._loads,<EOL>url=self.kwargs['<STR_LIT:url>'])<EOL><DEDENT>logger.debug("<STR_LIT>" % self.state)<EOL>
Create the connection

Returns
-------
self

Raises
------
exception.PeonyException
    On a response status in 4xx that are not status 420 or 429
    Also on statuses in 1xx or 3xx since this should not be the status
    received here