def METHOD_NAME(pipeline_tree, task_params):
    if task_params.get("exclude_task_nodes_id"):
        return task_params["exclude_task_nodes_id"]
    exclude_task_nodes_id = []
    if task_params.get("appoint_task_nodes_id"):
        exclude_task_nodes_id = PipelineTemplateWebPreviewer.get_template_exclude_task_nodes_with_appoint_nodes(
            pipeline_tree, task_params["appoint_task_nodes_id"]
        )
    elif task_params.get("template_schemes_id"):
        exclude_task_nodes_id = PipelineTemplateWebPreviewer.get_template_exclude_task_nodes_with_schemes(
            pipeline_tree, task_params["template_schemes_id"], check_schemes_exist=True
        )
    return exclude_task_nodes_id