code: def _model_filter_in_operator_generator(
      filter_operator: Operator,
  ) -> Generator:
      """Generator for model filters in an operator."""
      for operator in filter_operator:
          if isinstance(operator.unresolved_value, ModelFilter):
              yield operator
  
imports: from __future__ import absolute_import
  import copy
  from concurrent.futures import ThreadPoolExecutor, as_completed
  from functools import cmp_to_key
  import json
  from typing import Any, Generator, List, Optional, Tuple, Union, Set, Dict
  from packaging.version import Version
  from sagemaker.jumpstart import accessors
  from sagemaker.jumpstart.constants import DEFAULT_JUMPSTART_SAGEMAKER_SESSION, JUMPSTART_DEFAULT_REGION_NAME
  from sagemaker.jumpstart.enums import JumpStartScriptScope
  from sagemaker.jumpstart.filters import SPECIAL_SUPPORTED_FILTER_KEYS, BooleanValues, Identity, SpecialSupportedFilterKeys
  from sagemaker.jumpstart.filters import Constant, ModelFilter, Operator, evaluate_filter_expression
  from sagemaker.jumpstart.types import JumpStartModelHeader, JumpStartModelSpecs
  from sagemaker.jumpstart.utils import get_jumpstart_content_bucket, get_sagemaker_version, verify_model_region_and_return_specs
  from sagemaker.session import Session
label_desc: Use image node_id 2 for calling a global function with example usage: _model_filter_in_operator_generator(filter_operator) without return types