class_docstr: Describes a series of joins between the measure semantic model, and other semantic models by entity.
  
  For example:
  
  (measure_source JOIN dimension_source0 ON entity A) JOIN dimension_source1 ON entity B
  
  would be represented by 2 path elements [(semantic_model0, A), (dimension_source1, B)]
docstr: Given the current path, generate the respective linkable elements from the last semantic model in the path.
docstr_tok: ["Given","the","current","path",",","generate","the","respective","linkable","elements","from","the","last","semantic","model","in","the","path","."]
code: def create_linkable_element_set(
      self,
      semantic_model_accessor: SemanticModelAccessor,
      with_properties: FrozenSet[LinkableElementProperties],
  ) -> LinkableElementSet:
      """Given the current path, generate the respective linkable elements from the last semantic model in the path."""
      entity_links = tuple(x.join_on_entity for x in self.path_elements)
  
      assert len(self.path_elements) > 0
      semantic_model = semantic_model_accessor.get_by_reference(
          self.path_elements[-1].semantic_model_reference
      )
      assert semantic_model
  
      linkable_dimensions: List[LinkableDimension] = []
      linkable_entities: List[LinkableEntity] = []
  
      for dimension in semantic_model.dimensions:
          dimension_type = dimension.type
          if dimension_type == DimensionType.CATEGORICAL:
              linkable_dimensions.append(
                  LinkableDimension(
                      semantic_model_origin=semantic_model.reference,
                      element_name=dimension.reference.element_name,
                      entity_links=entity_links,
                      join_path=self.path_elements,
                      properties=with_properties,
                      time_granularity=None,
                      date_part=None,
                  )
              )
          elif dimension_type == DimensionType.TIME:
              linkable_dimensions.extend(
                  _generate_linkable_time_dimensions(
                      semantic_model_origin=semantic_model.reference,
                      dimension=dimension,
                      entity_links=entity_links,
                      join_path=(),
                      with_properties=with_properties,
                  )
              )
          else:
              raise RuntimeError(f"Unhandled type: {dimension_type}")
  
      for entity in semantic_model.entities:
          # Avoid creating "booking_id__booking_id"
          if entity.reference != entity_links[-1]:
              linkable_entities.append(
                  LinkableEntity(
                      semantic_model_origin=semantic_model.reference,
                      element_name=entity.reference.element_name,
                      entity_links=entity_links,
                      join_path=self.path_elements,
                      properties=with_properties.union(
                          {LinkableElementProperties.ENTITY}
                      ),
                  )
              )
  
      return LinkableElementSet(
          path_key_to_linkable_dimensions={
              linkable_dimension.path_key: (linkable_dimension,)
              for linkable_dimension in linkable_dimensions
          },
          path_key_to_linkable_entities={
              linkable_entity.path_key: (linkable_entity,)
              for linkable_entity in linkable_entities
          },
      )
  
imports: from __future__ import annotations
  import logging
  import time
  from collections import defaultdict
  from dataclasses import dataclass
  from typing import Dict, FrozenSet, List, Optional, Sequence, Set, Tuple
  from dbt_semantic_interfaces.enum_extension import assert_values_exhausted
  from dbt_semantic_interfaces.pretty_print import pformat_big_objects
  from dbt_semantic_interfaces.protocols.dimension import Dimension, DimensionType
  from dbt_semantic_interfaces.protocols.semantic_manifest import SemanticManifest
  from dbt_semantic_interfaces.protocols.semantic_model import SemanticModel
  from dbt_semantic_interfaces.references import DimensionReference, MeasureReference, MetricReference, SemanticModelReference, TimeDimensionReference
  from dbt_semantic_interfaces.type_enums import MetricType
  from dbt_semantic_interfaces.type_enums.date_part import DatePart
  from dbt_semantic_interfaces.type_enums.time_granularity import TimeGranularity
  from metricflow.dataset.dataset import DataSet
  from metricflow.errors.errors import UnknownMetricLinkingError
  from metricflow.model.semantics.linkable_element_properties import LinkableElementProperties
  from metricflow.model.semantics.semantic_model_join_evaluator import SemanticModelJoinEvaluator
  from metricflow.model.semantics.semantic_model_lookup import SemanticModelLookup
  from metricflow.protocols.semantics import SemanticModelAccessor
  from metricflow.specs.specs import DEFAULT_TIME_GRANULARITY, DimensionSpec, EntityReference, EntitySpec, LinkableSpecSet, TimeDimensionSpec
label_desc: Use image node_id 1 for calling the SemanticModelJoinPath obj's underlying member method code with example usage: obj.create_linkable_element_set(semantic_model_accessor, with_properties) and returns: LinkableElementSet