code: def test_linkless_entity() -> None:  # noqa: D
      """Check that equals and hash works as expected for the LinklessEntitySpec / EntitySpec."""
      entity_spec = EntitySpec(element_name="user_id", entity_links=())
      linkless_entity_spec = LinklessEntitySpec.from_element_name(
          "user_id"
      )
  
      # Check equality between the two.
      assert entity_spec == entity_spec
      assert linkless_entity_spec == linkless_entity_spec
      assert entity_spec == linkless_entity_spec
  
      # Check that they are treated equivalently in sets.
      set_with_entity_spec = {entity_spec}
      assert entity_spec in set_with_entity_spec
      assert linkless_entity_spec in set_with_entity_spec
  
      set_with_linkless_entity_spec = {linkless_entity_spec}
      assert entity_spec in set_with_linkless_entity_spec
      assert linkless_entity_spec in set_with_linkless_entity_spec
  
      set_with_entity_spec.add(linkless_entity_spec)
      assert len(set_with_entity_spec) == 1
  
imports: from __future__ import annotations
  from typing import Sequence
  import pytest
  from dbt_semantic_interfaces.type_enums.time_granularity import TimeGranularity
  from metricflow.specs.specs import DimensionSpec, EntityReference, EntitySpec, InstanceSpec, InstanceSpecSet, LinkableInstanceSpec, LinklessEntitySpec, MeasureSpec, MetricSpec, TimeDimensionSpec
label_desc: Use image node_id 17 for calling a global function with example usage: test_linkless_entity() without return types