Select the key for a tool from a list of supported tools.

    This function is designed to help when multiple keys can be used to specify
    an option (e.g., during migration from one name to another).  The values in
    keys should be ordered based on preference, as that's the order they'll be
    checked.  If anything other than the first entry is selected, a warning
    will be displayed telling the user to migrate their configuration.

    Arguments:
    full_configuration - the full configuration for a run of the project
    keys - a list of keys to consider

def choose_tool_key(full_configuration, keys):
    """
    Select the key for a tool from a list of supported tools.

    This function is designed to help when multiple keys can be used to specify
    an option (e.g., during migration from one name to another).  The values in
    keys should be ordered based on preference, as that's the order they'll be
    checked.  If anything other than the first entry is selected, a warning
    will be displayed telling the user to migrate their configuration.

    Arguments:
    full_configuration - the full configuration for a run of the project
    keys - a list of keys to consider
    """
    tool_key = _choose_key(full_configuration.config, keys)
    if tool_key != keys[0]:
        full_configuration.executor.warning(
            "{} is deprecated; migrate to {}".format(tool_key, keys[0])
        )
    return tool_key