human
I wrote the below code

    import plexapi.server
    import plexapi.exceptions
    cert_session = None
    http_prefix = ('https' if has_ssl else 'http')
    if (has_ssl and (verify_ssl is False)):
        _LOGGER.info('Ignoring    SSL    verification')
        cert_session = requests.Session()
        cert_session.verify = False
    try:
        plexserver = plexapi.server.PlexServer(('%s://%s' % (http_prefix, host)), token, cert_session)
        _LOGGER.info('Discovery    configuration    done    (no    token    needed)')
    except (plexapi.exceptions.BadRequest, plexapi.exceptions.Unauthorized, plexapi.exceptions.NotFound) as error:
        _LOGGER.info(error)
        request_configuration(host, hass, config, add_devices_callback)
        return
    if (host in _CONFIGURING):
        request_id = _CONFIGURING.pop(host)
        configurator = get_component('configurator')
        configurator.request_done(request_id)
        _LOGGER.info('Discovery    configuration    done')
    if (not config_from_file(hass.config.path(PLEX_CONFIG_FILE), {host: {'token': token, 'ssl': has_ssl, 'verify': verify_ssl}})):
        _LOGGER.error('Failed    to    save    configuration    file')
    _LOGGER.info('Connected    to:    %s://%s', http_prefix, host)
    plex_clients = {}
    plex_sessions = {}
    track_utc_time_change(hass, (lambda now: update_devices()), second=30)
    @util.Throttle(MIN_TIME_BETWEEN_SCANS, MIN_TIME_BETWEEN_FORCED_SCANS)
    def update_devices():
        'Update    the    devices    objects.'
        try:
            devices = plexserver.clients()
        except plexapi.exceptions.BadRequest:
            _LOGGER.exception('Error    listing    plex    devices')
            return
        except requests.exceptions.RequestException as ex:
            _LOGGER.error('Could    not    connect    to    plex    server    at    http://%s    (%s)', host, ex)
            return
        new_plex_clients = []
        for device in devices:
            if (device.deviceClass in ['badClient']):
                continue
            if...

What's a good function header?
assistant
#Here is Python code to fix = ('https' if has_ssl else 'http')
.

def setup_plexserver(host, token, has_ssl, verify_ssl, hass, config, add_devices_callback):