code: def list_jumpstart_frameworks(  # pylint: disable=redefined-builtin
      filter: Union[Operator, str] = Constant(BooleanValues.TRUE),
      region: str = JUMPSTART_DEFAULT_REGION_NAME,
      sagemaker_session: Session = DEFAULT_JUMPSTART_SAGEMAKER_SESSION,
  ) -> List[str]:
      """List frameworks for JumpStart, and optionally apply filters to result.
  
      Args:
          filter (Union[Operator, str]): Optional. The filter to apply to list frameworks. This can be
              either an ``Operator`` type filter (e.g. ``And("task == ic", "framework == pytorch")``),
              or simply a string filter which will get serialized into an Identity filter.
              (eg. ``"task == ic"``). If this argument is not supplied, all frameworks will be listed.
              (Default: Constant(BooleanValues.TRUE)).
          region (str): Optional. The AWS region from which to retrieve JumpStart metadata regarding
              models. (Default: JUMPSTART_DEFAULT_REGION_NAME).
          sagemaker_session (sagemaker.session.Session): Optional. The SageMaker Session
              to use to perform the model search. (Default: DEFAULT_JUMPSTART_SAGEMAKER_SESSION).
      """
  
      frameworks: Set[str] = set()
      for model_id, _ in _generate_jumpstart_model_versions(
          filter=filter,
          region=region,
          sagemaker_session=sagemaker_session,
      ):
          framework, _, _ = extract_framework_task_model(model_id)
          frameworks.add(framework)
      return sorted(list(frameworks))
  
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 7 for calling a global function with example usage: list_jumpstart_frameworks(filter, region, sagemaker_session) and returns: sorted