class_docstr: Task builder for standard data warehouse validation tasks.
class_docstr_tok: ["Task","builder","for","standard","data","warehouse","validation","tasks","."]
docstr: Builds and returns the SemanticModelDataSet node for the given semantic model.
docstr_tok: ["Builds","and","returns","the","SemanticModelDataSet","node","for","the","given","semantic","model","."]
code: def _semantic_model_nodes(
      render_tools: QueryRenderingTools, semantic_model: SemanticModel
  ) -> Sequence[BaseOutput]:
      """Builds and returns the SemanticModelDataSet node for the given semantic model."""
      fetched_semantic_model = render_tools.semantic_manifest_lookup.semantic_model_lookup.get_by_reference(
          SemanticModelReference(
              semantic_model_name=semantic_model.name
          )
      )
      assert fetched_semantic_model is not None
  
      source_nodes = (
          render_tools.source_node_builder.create_from_data_sets(
              (
                  render_tools.converter.create_sql_source_data_set(
                      fetched_semantic_model
                  ),
              )
          )
      )
  
      assert len(source_nodes) >= 1
      return source_nodes
  
imports: from __future__ import annotations
  import collections
  import traceback
  from dataclasses import dataclass, field
  from functools import partial
  from math import floor
  from time import perf_counter
  from typing import Callable, DefaultDict, Dict, List, Optional, Sequence, Tuple, TypeVar
  from dbt_semantic_interfaces.protocols.metric import Metric
  from dbt_semantic_interfaces.protocols.semantic_manifest import SemanticManifest
  from dbt_semantic_interfaces.protocols.semantic_model import SemanticModel
  from dbt_semantic_interfaces.references import MetricModelReference, SemanticModelElementReference, SemanticModelReference
  from dbt_semantic_interfaces.validations.validator_helpers import FileContext, MetricContext, SemanticManifestValidationResults, SemanticModelContext, SemanticModelElementContext, SemanticModelElementType, ValidationContext, ValidationError, ValidationIssue, ValidationWarning
  from metricflow.dataflow.builder.node_data_set import DataflowPlanNodeOutputDataSetResolver
  from metricflow.dataflow.builder.source_node import SourceNodeBuilder
  from metricflow.dataflow.dataflow_plan import BaseOutput, FilterElementsNode
  from metricflow.dataset.convert_semantic_model import SemanticModelToDataSetConverter
  from metricflow.dataset.dataset import DataSet
  from metricflow.engine.metricflow_engine import MetricFlowEngine, MetricFlowExplainResult, MetricFlowQueryRequest
  from metricflow.model.semantic_manifest_lookup import SemanticManifestLookup
  from metricflow.plan_conversion.column_resolver import DunderColumnAssociationResolver
  from metricflow.plan_conversion.dataflow_to_sql import DataflowToSqlQueryPlanConverter
  from metricflow.plan_conversion.time_spine import TimeSpineSource
  from metricflow.protocols.sql_client import SqlClient
  from metricflow.specs.specs import InstanceSpecSet, LinkableInstanceSpec, MeasureSpec
  from metricflow.sql.sql_bind_parameters import SqlBindParameters
label_desc: Use image node_id 2 for calling the DataWarehouseTaskBuilder obj's underlying member method code with example usage: obj._semantic_model_nodes(render_tools, semantic_model) and returns: source_nodes