def _process_url(self, url):
        parsed = utils.urlparse(url)

        # Ensure the protocol scheme is what is expected
        if parsed.scheme not in list(self.PORTS.keys()):
            raise ValueError('Unsupported protocol: %s' % parsed.scheme)

        # Toggle the SSL flag based upon the URL scheme
        use_ssl = True if parsed.scheme == 'amqps' else False

        # Ensure that SSL is available if SSL is requested
        if use_ssl and not ssl:
            LOGGER.warning('SSL requested but not available, disabling')
            use_ssl = False

        # Use the default ports if one is not specified
        port = parsed.port or (self.PORTS[AMQPS] if parsed.scheme == AMQPS
                               else self.PORTS[AMQP])

        # Set the vhost to be after the base slash if it was specified
        vhost = parsed.path[1:] if parsed.path else self.DEFAULT_VHOST

        # If the path was just the base path, set the vhost to the default
        if not vhost:
            vhost = self.DEFAULT_VHOST

        # Parse the query string
        query_values = utils.parse_qs(parsed.query)

        channel_max = int(query_values.get('channel_max', [None])[0] or
                          self.DEFAULT_CHANNEL_MAX)
        frame_max = int(query_values.get('frame_max', [None])[0] or
                        specification.FRAME_MAX_SIZE)
        heartbeat_interval = int(query_values.get('heartbeat', [None])[0] or
                                 self.DEFAULT_HEARTBEAT_INTERVAL)
        # DEFAULT_TIMEOUT does not have to be 0, so explicitly setting 0
        # (False-ish) should not lead to using it, thus no "or" here but
        # the precise check against None.
        timeout = query_values.get('timeout', [None])[0]
        timeout = self.DEFAULT_TIMEOUT if timeout is None else float(timeout)

        # Return the configuration dictionary to use when connecting
        return {'host': parsed.hostname,
                'port': port,
                'virtual_host': utils.unquote(vhost),
                'username': parsed.username or self.GUEST,
                'password': parsed.password or self.GUEST,
                'timeout': timeout,
                'heartbeat': heartbeat_interval,
                'frame_max': frame_max,
                'channel_max': channel_max,
                'locale': query_values.get('locale', [None])[0],
                'ssl': use_ssl,
                'cacertfile': (query_values.get('cacertfile', [None])[0] or
                               query_values.get('ssl_cacert', [None])[0]),
                'certfile': (query_values.get('certfile', [None])[0] or
                             query_values.get('ssl_cert', [None])[0]),
                'keyfile': (query_values.get('keyfile', [None])[0] or
                            query_values.get('ssl_key', [None])[0]),
                'verify': self._get_ssl_validation(query_values),
                'ssl_version': self._get_ssl_version(query_values)}
Determines language of a code block from shebang line and whether said
dataset/ETHPy150Open gmr/rabbitpy/rabbitpy/connection.py/Connection._process_url--crossover with--dataset/ETHPy150Open dragondjf/QMarkdowner/markdown/extensions/codehilite.py/CodeHilite._parseHeader