class_docstr: Converts a semantic model in the model to a data set that can be used with the dataflow plan builder.
  
  Entity links generally refer to the entities used to join the measure source to the dimension source. For
  example, the dimension name "user_id__device_id__platform" has entity links "user_id" and "device_id" and would
  mean that the measure source was joined by "user_id" to an intermediate source, and then it was joined by
  "device_id" to the source containing the "platform" dimension.
class_docstr_tok: ["Converts","a","semantic","model","in","the","model","to","a","data","set","that","can","be","used","with","the","dataflow","plan","builder",".","Entity","links","generally","refer","to","the","entities","used","to","join","the","measure","source","to","the","dimension","source",".","For","example",",","the","dimension","name","``","user_id__device_id__platform","''","has","entity","links","``","user_id","''","and","``","device_id","''","and","would","mean","that","the","measure","source","was","joined","by","``","user_id","''","to","an","intermediate","source",",","and","then","it","was","joined","by","''","device_id","''","to","the","source","containing","the","``","platform","''","dimension","."]
code: def _convert_measures(
      self,
      semantic_model_name: str,
      measures: Sequence[Measure],
      table_alias: str,
  ) -> Tuple[Sequence[MeasureInstance], Sequence[SqlSelectColumn]]:
      # Convert all elements to instances
      measure_instances = []
      select_columns = []
      for measure in measures or []:
          measure_spec = MeasureConverter.convert_to_measure_spec(
              measure=measure
          )
          measure_instance = MeasureInstance(
              associated_columns=(
                  self._column_association_resolver.resolve_spec(
                      measure_spec
                  ),
              ),
              spec=measure_spec,
              defined_from=(
                  SemanticModelElementReference(
                      semantic_model_name=semantic_model_name,
                      element_name=measure.reference.element_name,
                  ),
              ),
              aggregation_state=AggregationState.NON_AGGREGATED,
          )
          measure_instances.append(measure_instance)
          select_columns.append(
              SqlSelectColumn(
                  expr=SemanticModelToDataSetConverter._make_element_sql_expr(
                      table_alias=table_alias,
                      element_name=measure.reference.element_name,
                      element_expr=measure.expr,
                  ),
                  column_alias=measure_instance.associated_column.column_name,
              )
          )
  
      return measure_instances, select_columns
  
imports: from __future__ import annotations
  import logging
  import re
  from dataclasses import dataclass
  from typing import List, Optional, Sequence, Tuple
  from dbt_semantic_interfaces.protocols.dimension import Dimension, DimensionType
  from dbt_semantic_interfaces.protocols.entity import Entity
  from dbt_semantic_interfaces.protocols.measure import Measure
  from dbt_semantic_interfaces.protocols.semantic_model import SemanticModel
  from dbt_semantic_interfaces.references import SemanticModelElementReference, SemanticModelReference
  from dbt_semantic_interfaces.type_enums.date_part import DatePart
  from dbt_semantic_interfaces.type_enums.time_granularity import TimeGranularity
  from metricflow.aggregation_properties import AggregationState
  from metricflow.dag.id_generation import IdGeneratorRegistry
  from metricflow.dataflow.sql_table import SqlTable
  from metricflow.dataset.semantic_model_adapter import SemanticModelDataSet
  from metricflow.instances import DimensionInstance, EntityInstance, InstanceSet, MeasureInstance, TimeDimensionInstance
  from metricflow.model.semantics.semantic_model_lookup import SemanticModelLookup
  from metricflow.model.spec_converters import MeasureConverter
  from metricflow.specs.column_assoc import ColumnAssociationResolver
  from metricflow.specs.specs import DEFAULT_TIME_GRANULARITY, DimensionSpec, EntityReference, EntitySpec, TimeDimensionSpec
  from metricflow.sql.sql_exprs import SqlColumnReference, SqlColumnReferenceExpression, SqlDateTruncExpression, SqlExpressionNode, SqlExtractExpression, SqlStringExpression
  from metricflow.sql.sql_plan import SqlQueryPlanNode, SqlSelectColumn, SqlSelectStatementNode, SqlTableFromClauseNode
label_desc: Use image node_id 6 for calling the SemanticModelToDataSetConverter obj's underlying member method code with example usage: obj._convert_measures(semantic_model_name, measures, table_alias) and returns: measure_instances,  select_columns