code: def _create_connection(self):
          
          attempts = 0
          while True:
              attempts += 1
              if self._stopped.is_set():
                  break
              try:
                  self._connection = Connection(self.hostname,
                                                self.username,
                                                self.password)
                  break
              except amqpstorm.AMQPError as why:
                  LOGGER.warning(why)
                  if self.max_retries and attempts > self.max_retries:
                      raise Exception('max number of retries reached')
                  time.sleep(min(attempts * 2, 30))
              except KeyboardInterrupt:
                  break
docs: Create a connection.
  
          :return: