def get_test_home_assistant(num_threads=None):
    """Return a Home Assistant object pointing at test config dir."""
    if num_threads:
        orig_num_threads = ha.MIN_WORKER_THREAD
        ha.MIN_WORKER_THREAD = num_threads

    hass = ha.HomeAssistant()

    if num_threads:
        ha.MIN_WORKER_THREAD = orig_num_threads

    hass.config.config_dir = get_test_config_dir()
    hass.config.latitude = 32.87336
    hass.config.longitude = -117.22743
    hass.config.time_zone = date_util.get_time_zone('US/Pacific')
    hass.config.temperature_unit = TEMP_CELSIUS

    if 'custom_components.test' is loader.AVAILABLE_COMPONENTS:
        loader.prepare(hass)

    return hass
dataset/ETHPy150Open home-assistant/home-assistant/tests/common.py/get_test_home_assistant/operator `not in` -> `is`