def load_config(domain):
    """
    Parses and loads up the Galah configuration file and extracts the
    configuration data for the given domain (ex: "web" or "sheep").

    Global configuration options will always be returned, no matter the domain.

    The configuration file will only be loaded once per instance of the
    interpreter, so feel free to call this function multiple times in many files
    to avoid ugly dependency issues.

    """

    global loaded

    # Note whether this is the first time we're processing the configuraiton. If
    # it is, we'll want to attach the global log handlers.
    first_load = loaded == None

    # Load the configuration if it hasn't been loaded yet. Note this ensures
    # that the configuration is only loaded once per instance of the
    # interpreter
    config_file = os.environ.get("GALAH_CONFIG_PATH",
                                 "/etc/galah/galah.config")
    if not loaded:
        if os.path.isfile(config_file):
            loaded = imp.load_source(
                "user_config_file", config_file
            )

    local_config = {}

    # Note we make a **shallow** copy of the defaults here
    user_config = dict(defaults)

    # If the configuration didn't load correctly, just use the defaults
    if loaded:
        user_config.update(loaded.config)

    # The prefix values we will look for when scanning the configuration file.
    prefix = "%s/" % domain
    global_prefix = "global/"

    # Grab all the configuration values for the given domain, and any global
    # configuration values, then place the rest of the configuration values
    # in there as well.
    for k, v in user_config.items():
        if k.startswith(prefix) and len(k) != len(prefix):
            local_key = k[len(prefix):]

            local_config[local_key] = v
        elif k.startswith(global_prefix) and len(k) != len(global_prefix):
            global_key = k[len(global_prefix):]

            local_config[global_key] = v
        elif "/" in k:
            local_config[k] = v

    return local_config
dataset/ETHPy150Open ucrcsedept/galah/galah/base/config.py/load_config/operator `is` -> `==`