def _get_instance(hass):
    """Get an instance per hass object."""
    try:
        return _INSTANCES[hass]
    except __HOLE__:
        _INSTANCES[hass] = Configurator(hass)

        if DOMAIN not in hass.config.components:
            hass.config.components.append(DOMAIN)

        return _INSTANCES[hass]
dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/components/configurator.py/_get_instance