def check_configuration(ctx, base_key, needed_keys):
    """
    Confrim a valid configuration.

    Args:
        ctx (invoke.context):
        base_key (str): the base configuration key everything is under.
        needed_keys (list): sub-keys of the base key that are checked to make
            sure they exist.
    """

    # check for valid configuration
    if base_key not in ctx.keys():
        exit("[{}ERROR{}] missing configuration for '{}'"
             .format(ERROR_COLOR, RESET_COLOR, base_key))
        # TODO: offer to create configuration file
    if ctx.releaser is None:
        exit("[{}ERROR{}] empty configuration for '{}' found"
             .format(ERROR_COLOR, RESET_COLOR, base_key))
        # TODO: offer to create configuration file

    # TODO: allow use of default values
    for my_key in needed_keys:
        if my_key not in ctx[base_key].keys():
            exit("[{}ERROR{}] missing configuration key '{}.{}'"
                 .format(ERROR_COLOR, RESET_COLOR, base_key, my_key))
Confrim a valid configuration.

    Args:
        ctx (invoke.context):
        base_key (str): the base configuration key everything is under.
        needed_keys (list): sub-keys of the base key that are checked to make
            sure they exist.