def setup_platform(hass, config, add_devices, discovery_info=None):
    add_devices(
        [TwitchSensor(channel) for channel in config.get('channels', [])])
Error if template loaders are specified and APP_DIRS is True.
dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/components/sensor/twitch.py/setup_platform--crossover with--dataset/ETHPy150Open django/django/tests/check_framework/test_templates.py/CheckTemplateSettingsAppDirsTest.test_app_dirs_and_loaders