<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def connect(self):
 """ Create internal connection to AMQP service. """

        logging.info("Connecting to {} with user {}.".format(self.host, self.username))
        credentials = pika.PlainCredentials(self.username, self.password)
        connection_params = pika.ConnectionParameters(host=self.host,
                                                      credentials=credentials,
                                                      heartbeat_interval=self.heartbeat_interval)
        self.connection = pika.BlockingConnection(connection_params)