code: def __init__(  # noqa: D
      self,
      semantic_manifest: SemanticManifest,
      semantic_model_lookup: SemanticModelLookup,
  ) -> None:
      self._semantic_manifest = semantic_manifest
      self._metrics: Dict[MetricReference, Metric] = {}
      self._semantic_model_lookup = semantic_model_lookup
  
      for metric in self._semantic_manifest.metrics:
          self.add_metric(metric)
  
      self._linkable_spec_resolver = ValidLinkableSpecResolver(
          semantic_manifest=self._semantic_manifest,
          semantic_model_lookup=semantic_model_lookup,
          max_entity_links=MAX_JOIN_HOPS,
      )
  
imports: from __future__ import annotations
  import logging
  from typing import Dict, FrozenSet, Optional, Sequence, Set
  from dbt_semantic_interfaces.enum_extension import assert_values_exhausted
  from dbt_semantic_interfaces.protocols.metric import Metric, MetricInputMeasure, MetricType
  from dbt_semantic_interfaces.protocols.semantic_manifest import SemanticManifest
  from dbt_semantic_interfaces.references import MeasureReference, MetricReference
  from metricflow.errors.errors import DuplicateMetricError, MetricNotFoundError, NonExistentMeasureError
  from metricflow.model.semantics.linkable_element_properties import LinkableElementProperties
  from metricflow.model.semantics.linkable_spec_resolver import LinkableElementSet, ValidLinkableSpecResolver
  from metricflow.model.semantics.semantic_model_join_evaluator import MAX_JOIN_HOPS
  from metricflow.model.semantics.semantic_model_lookup import SemanticModelLookup
  from metricflow.protocols.semantics import MetricAccessor
  from metricflow.specs.specs import LinkableInstanceSpec
label_desc: Use image node_id 1 to create a new MetricLookup object from inherited base classes: MetricAccessor with example: obj = MetricLookup(semantic_manifest, semantic_model_lookup)