human
Complete this python program:
def get_compiler_config(scope=None, init_config=True):
assistant
#Here is the Python code you requested.

    """Return the compiler configuration for the specified architecture.
    """
    def init_compiler_config():
        'Compiler    search    used    when    Spack    has    no    compilers.'
        compilers = find_compilers()
        compilers_dict = []
        for compiler in compilers:
            compilers_dict.append(_to_dict(compiler))
        spack.config.update_config('compilers', compilers_dict, scope=scope)
    config = spack.config.get_config('compilers', scope=scope)
    if ((not config) and init_config):
        if (scope is None):
            init_compiler_config()
            config = spack.config.get_config('compilers', scope=scope)
        elif (scope == 'user'):
            site_config = spack.config.get_config('compilers', scope='site')
            sys_config = spack.config.get_config('compilers', scope='system')
            if ((not site_config) and (not sys_config)):
                init_compiler_config()
                config = spack.config.get_config('compilers', scope=scope)
        return config
    elif config:
        return config
    else:
        return []