def get_cf_name(env_name, layer_name, stage=None):
    """Produces the CF stack name for layer."""
    cf_name = '{}-{}'.format(env_name, layer_name)
    if stage is not None:
        cf_name = '{}-{}'.format(cf_name, stage)
    return cf_name
