code: def test_foreign_target_semantic_model_join_validation(
      simple_semantic_manifest_lookup: SemanticManifestLookup,
  ) -> None:
      """Tests semantic model join validation to FOREIGN entity types.
  
      These should all fail by default, as fanout joins are not supported
      """
      semantic_model_references = (
          __get_simple_model_user_semantic_model_references_by_type(
              simple_semantic_manifest_lookup
          )
      )
      user_entity_reference = EntityReference(element_name="user")
      join_evaluator = SemanticModelJoinEvaluator(
          semantic_model_lookup=simple_semantic_manifest_lookup.semantic_model_lookup
      )
  
      foreign_foreign = join_evaluator.is_valid_semantic_model_join(
          left_semantic_model_reference=semantic_model_references[
              EntityType.FOREIGN
          ],
          right_semantic_model_reference=semantic_model_references[
              EntityType.FOREIGN
          ],
          on_entity_reference=user_entity_reference,
      )
      primary_foreign = join_evaluator.is_valid_semantic_model_join(
          left_semantic_model_reference=semantic_model_references[
              EntityType.PRIMARY
          ],
          right_semantic_model_reference=semantic_model_references[
              EntityType.FOREIGN
          ],
          on_entity_reference=user_entity_reference,
      )
      unique_foreign = join_evaluator.is_valid_semantic_model_join(
          left_semantic_model_reference=semantic_model_references[
              EntityType.UNIQUE
          ],
          right_semantic_model_reference=semantic_model_references[
              EntityType.FOREIGN
          ],
          on_entity_reference=user_entity_reference,
      )
  
      results = {
          "foreign to foreign": foreign_foreign,
          "primary to foreign": primary_foreign,
          "unique to foreign": unique_foreign,
      }
      assert not any(results.values()), (
          f"All semantic model level joins against foreign targets should be invalid, but we found at least one "
          f"that was not! Incorrectly passing types: {[k for k,v in results.items() if v]}."
      )
  
file_path: metricflow/metricflow/test/model/semantics/test_semantic_model_join_evaluator.py
imports: from __future__ import annotations
  from typing import Dict, Sequence
  from dbt_semantic_interfaces.enum_extension import assert_values_exhausted
  from dbt_semantic_interfaces.protocols.entity import EntityType
  from dbt_semantic_interfaces.references import EntityReference, SemanticModelReference
  from metricflow.model.semantic_manifest_lookup import SemanticManifestLookup
  from metricflow.model.semantics.semantic_model_join_evaluator import SemanticModelEntityJoin, SemanticModelEntityJoinType, SemanticModelJoinEvaluator, SemanticModelLink
  from metricflow.test.fixtures.model_fixtures import ConsistentIdObjectRepository
label_desc: Use image node_id 5 for calling a global function with example usage: test_foreign_target_semantic_model_join_validation(simple_semantic_manifest_lookup) without return types