def METHOD_NAME(self, iac_hook_wrapper, opts, ctx):
    # call prepare hook
    built_template_path = DEFAULT_BUILT_TEMPLATE_PATH
    if not self._force_prepare and os.path.exists(built_template_path):
        LOG.info("Skipped prepare hook. Current application is already prepared.")
    else:
        LOG.info("Running Prepare Hook to prepare the current application")
        iac_project_path = os.getcwd()
        output_dir_path = os.path.join(iac_project_path, ".aws-sam-iacs", "iacs_metadata")
        if not os.path.exists(output_dir_path):
            os.makedirs(output_dir_path, exist_ok=True)
        debug = _read_parameter_value("debug", opts, ctx, False)
        aws_profile = _read_parameter_value("profile", opts, ctx)
        aws_region = _read_parameter_value("region", opts, ctx)
        skip_prepare_infra = _read_parameter_value("skip_prepare_infra", opts, ctx, False)
        plan_file = _read_parameter_value("terraform_plan_file", opts, ctx)
        project_root_dir = _read_parameter_value("terraform_project_root_path", opts, ctx)
        metadata_file = iac_hook_wrapper.prepare(
            output_dir_path,
            iac_project_path,
            debug,
            aws_profile,
            aws_region,
            skip_prepare_infra,
            plan_file,
            project_root_dir,
        )
        LOG.info("Prepare hook completed and metadata file generated at: %s", metadata_file)
        opts["template_file"] = metadata_file