code: def test_list_jumpstart_models_script_filter(
      self, patched_read_s3_file: Mock, patched_get_manifest: Mock
  ):
      patched_read_s3_file.side_effect = (
          lambda *args, **kwargs: json.dumps(
              get_prototype_model_spec(
                  None, "pytorch-eqa-bert-base-cased"
              ).to_json()
          )
      )
      patched_get_manifest.side_effect = (
          lambda region, *args, **kwargs: get_prototype_manifest(region)
      )
  
      manifest_length = len(get_prototype_manifest())
      vals = [True, False]
      for val in vals:
          kwargs = {"filter": f"training_supported == {val}"}
          list_jumpstart_models(**kwargs)
          assert patched_read_s3_file.call_count == manifest_length
          patched_get_manifest.assert_called_once()
  
          patched_get_manifest.reset_mock()
          patched_read_s3_file.reset_mock()
  
          kwargs = {"filter": f"training_supported != {val}"}
          list_jumpstart_models(**kwargs)
          assert patched_read_s3_file.call_count == manifest_length
          patched_get_manifest.assert_called_once()
  
          patched_get_manifest.reset_mock()
          patched_read_s3_file.reset_mock()
  
      kwargs = {
          "filter": f"training_supported in {vals}",
          "list_versions": True,
      }
      assert list_jumpstart_models(**kwargs) == [
          ("catboost-classification-model", "1.0.0"),
          ("huggingface-spc-bert-base-cased", "1.0.0"),
          ("lightgbm-classification-model", "1.0.0"),
          ("mxnet-semseg-fcn-resnet50-ade", "1.0.0"),
          ("pytorch-eqa-bert-base-cased", "1.0.0"),
          ("sklearn-classification-linear", "1.0.0"),
          (
              "tensorflow-ic-bit-m-r101x1-ilsvrc2012-classification-1",
              "1.0.0",
          ),
          ("xgboost-classification-model", "1.0.0"),
      ]
      assert patched_read_s3_file.call_count == manifest_length
      patched_get_manifest.assert_called_once()
  
      patched_get_manifest.reset_mock()
      patched_read_s3_file.reset_mock()
  
      kwargs = {"filter": f"training_supported not in {vals}"}
      models = list_jumpstart_models(**kwargs)
      assert [] == models
      assert patched_read_s3_file.call_count == manifest_length
      patched_get_manifest.assert_called_once()
  
imports: from __future__ import absolute_import
  import json
  from unittest import TestCase
  from unittest.mock import Mock, patch
  import pytest
  from sagemaker.jumpstart.constants import DEFAULT_JUMPSTART_SAGEMAKER_SESSION, JUMPSTART_DEFAULT_REGION_NAME
  from sagemaker.jumpstart.filters import And, Identity, Not, Or
  from tests.unit.sagemaker.jumpstart.constants import PROTOTYPICAL_MODEL_SPECS_DICT
  from tests.unit.sagemaker.jumpstart.utils import get_header_from_base_header, get_prototype_manifest, get_prototype_model_spec
  from sagemaker.jumpstart.notebook_utils import _generate_jumpstart_model_versions, get_model_url, list_jumpstart_frameworks, list_jumpstart_models, list_jumpstart_scripts, list_jumpstart_tasks
label_desc: Use image node_id 2 for calling the ListJumpStartModels obj's underlying member method code with example usage: obj.test_list_jumpstart_models_script_filter(patched_read_s3_file, patched_get_manifest) without return types