def get_ready_theme(syntax_name, default_text_settings):
    """Return theme ready for usage.

    Works by retrieving a ready theme from a map and
    returning it. If the theme doesn't exist, its creation
    is delegated to create_ready_theme() and the new theme
    is stored back in the map before being returned at the
    end.

    Parameters
    ==========
    syntax_name (string)
        represents the syntax for which the theme data
        is used.
    default_text_settings (dict)
        text settings used as defaults for values not
        specified in the highlighting settings.
    """
    ### convert the text settings (a dict) to a custom
    ### tuple representing them, so the data is now hashable
    settings_tuple = settings_to_hashable_repr(default_text_settings)

    ### create a custom key by combining the syntax name
    ### with the tuple we just create in a single tuple
    key = (syntax_name, settings_tuple)

    ### try retrieving a ready theme from the ready theme
    ### maps with the key we just created
    try:
        ready_theme = READY_THEMES_MAP[key]

    ### if the key doesn't exist, create a ready theme
    ### for it using the received arguments

    except KeyError:

        ready_theme = READY_THEMES_MAP[key] = create_ready_theme(
            syntax_name, default_text_settings
        )

    ### finally return the ready theme
    return ready_theme
Return theme ready for usage.

    Works by retrieving a ready theme from a map and
    returning it. If the theme doesn't exist, its creation
    is delegated to create_ready_theme() and the new theme
    is stored back in the map before being returned at the
    end.

    Parameters
    ==========
    syntax_name (string)
        represents the syntax for which the theme data
        is used.
    default_text_settings (dict)
        text settings used as defaults for values not
        specified in the highlighting settings.
    
nodezator/syntaxman/utils.py