def build_params_dict(entity_name, config_params_key, additional_params=None):
    """ Returns a dictionary of parameters to use when rendering CloudFormation
    templates or user data scripts from template.

    Parameter sources include gonzo defined defaults, cloud configuration and
    a comma separated key value command line argument. They get overridden in
    that order. """
    params = {
        'hostname': entity_name,
        'stackname': entity_name,
        'domain': config.get_cloud()['DNS_ZONE'],
        'fqdn': "%s.%s" % (entity_name, config.get_cloud()['DNS_ZONE']),
    }

    if config.get_cloud() in config_params_key:
        params.update(config.get_cloud()[config_params_key])

    if additional_params is not None:
        params.update(additional_params)

    return params
dataset/ETHPy150Open onefinestay/gonzo/gonzo/helpers/document_loader.py/build_params_dict/swapped operands of `in`