code: def __get_filtered_measure_instance_set(
      semantic_model_name: str,
      measure_name: str,
      object_repo: ConsistentIdObjectRepository,
  ) -> InstanceSet:
      """Gets an InstanceSet consisting of only the measure instance matching the given name and semantic model."""
      dataset = object_repo.simple_model_data_sets[semantic_model_name]
      instance_set = dataset.instance_set
      include_specs = tuple(
          instance.spec
          for instance in instance_set.measure_instances
          if instance.spec.element_name == measure_name
      )
      return FilterElements(
          include_specs=InstanceSpecSet(measure_specs=include_specs)
      ).transform(instance_set)
  
file_path: metricflow/metricflow/test/plan_conversion/instance_converters/test_create_select_columns_with_measures_aggregated.py
imports: from __future__ import annotations
  from metricflow.instances import InstanceSet
  from metricflow.model.semantic_manifest_lookup import SemanticManifestLookup
  from metricflow.plan_conversion.column_resolver import DunderColumnAssociationResolver
  from metricflow.plan_conversion.instance_converters import CreateSelectColumnsWithMeasuresAggregated, FilterElements
  from metricflow.plan_conversion.select_column_gen import SelectColumnSet
  from metricflow.specs.specs import InstanceSpecSet, MeasureSpec, MetricInputMeasureSpec
  from metricflow.sql.sql_exprs import SqlAggregateFunctionExpression, SqlFunction, SqlPercentileExpression
  from metricflow.test.fixtures.model_fixtures import ConsistentIdObjectRepository
label_desc: Use image node_id 1 for calling a global function with example usage: __get_filtered_measure_instance_set(semantic_model_name, measure_name, object_repo) and returns: FilterElements