def METHOD_NAME(self):
    """Establish connection to the AMQP broker."""
    conninfo = self.client
    for name, default_value in self.default_connection_params.items():
        if not getattr(conninfo, name, None):
            setattr(conninfo, name, default_value)
    if conninfo.hostname == 'localhost':
        conninfo.hostname = '127.0.0.1'
    # when server_hostname is None, use hostname from URI.
    if isinstance(conninfo.ssl, dict) and \
            'server_hostname' in conninfo.ssl and \
            conninfo.ssl['server_hostname'] is None:
        conninfo.ssl['server_hostname'] = conninfo.hostname
    opts = dict({
        'host': conninfo.host,
        'userid': conninfo.userid,
        'password': conninfo.password,
        'login_method': conninfo.login_method,
        'virtual_host': conninfo.virtual_host,
        'insist': conninfo.insist,
        'ssl': conninfo.ssl,
        'connect_timeout': conninfo.connect_timeout,
        'heartbeat': conninfo.heartbeat,
    }, **conninfo.transport_options or {})
    conn = self.Connection(**opts)
    conn.client = self.client
    conn.connect()
    return conn