def METHOD_NAME(ctx, to_file, no_placeholders, path):
    """
    Prints the template used for stack in PATH.
    \f
    :param path: Path to execute the command on.
    :type path: str
    """
    context = SceptreContext(
        command_path=path,
        command_params=ctx.params,
        project_path=ctx.obj.get("project_path"),
        user_variables=ctx.obj.get("user_variables"),
        options=ctx.obj.get("options"),
        output_format=ctx.obj.get("output_format"),
        ignore_dependencies=ctx.obj.get("ignore_dependencies"),
    )
    plan = SceptrePlan(context)
    execution_context = (
        null_context() if no_placeholders else use_resolver_placeholders_on_error()
    )
    with execution_context:
        responses = plan.METHOD_NAME()
    output_format = "json" if context.output_format == "json" else "yaml"
    for stack, template in responses.items():
        stack_name = stack.external_name
        if to_file:
            file_path = Path(".dump") / stack_name / f"template.{output_format}"
            logger.info(f"{stack_name} dumping template to {file_path}")
            write(template, output_format, no_colour=True, file_path=file_path)
            logger.info(f"{stack_name} dump to {file_path} complete.")
        else:
            write(template, output_format, no_colour=True)