def get_or_default_template_file_name(ctx, param, provided_value, include_build):
search_paths = [<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>]<EOL>if include_build:<EOL><INDENT>search_paths.insert(<NUM_LIT:0>, os.path.join("<STR_LIT>", "<STR_LIT>", "<STR_LIT>"))<EOL><DEDENT>if provided_value == _TEMPLATE_OPTION_DEFAULT_VALUE:<EOL><INDENT>provided_value = "<STR_LIT>"<EOL>for option in search_paths:<EOL><INDENT>if os.path.exists(option):<EOL><INDENT>provided_value = option<EOL>break<EOL><DEDENT><DEDENT><DEDENT>result = os.path.abspath(provided_value)<EOL>LOG.debug("<STR_LIT>", result)<EOL>return result<EOL>
Default value for the template file name option is more complex than what Click can handle.
This method either returns user provided file name or one of the two default options (template.yaml/template.yml)
depending on the file that exists

:param ctx: Click Context
:param param: Param name
:param provided_value: Value provided by Click. It could either be the default value or provided by user.
:return: Actual value to be used in the CLI