code: def test_parse_filter_string():
      values = [
          "ic",
          "tc",
          "od",
          "pytorch",
          "huggingface",
          str(True),
          str(False),
          "od1",
      ]
      for key in [
          "task",
          "framework",
          "training_supported",
          "model_id",
      ]:
          for value in values:
              for operator in (
                  FILTER_OPERATOR_STRING_MAPPINGS[
                      FilterOperators.NOT_EQUALS
                  ]
                  + FILTER_OPERATOR_STRING_MAPPINGS[
                      FilterOperators.EQUALS
                  ]
              ):
                  model_filter = parse_filter_string(
                      f"{key} {operator} {value}"
                  )
                  assert model_filter.key == key
                  assert model_filter.operator == operator
                  assert model_filter.value == value
  
                  is_alphabetic_operator = any(
                      character.isalpha() for character in operator
                  )
                  if not is_alphabetic_operator:
                      model_filter = parse_filter_string(
                          f"{key}{operator}{value}"
                      )
                      assert model_filter.key == key
                      assert model_filter.operator == operator
                      assert model_filter.value == value
  
      for key in [
          "task",
          "framework",
          "training_supported",
          "model_id",
      ]:
          for value in [
              str([]),
              str(["some-val"]),
              str(["some-val-1", "some-val-2"]),
              str([True]),
              str([True, False]),
              str([1]),
              str([1, 2]),
          ]:
              for operator in (
                  FILTER_OPERATOR_STRING_MAPPINGS[
                      FilterOperators.NOT_IN
                  ]
                  + FILTER_OPERATOR_STRING_MAPPINGS[FilterOperators.IN]
              ):
                  value = sorted(list(value))
                  model_filter = parse_filter_string(
                      f"{key} {operator} {value}"
                  )
                  assert model_filter.key == key
                  assert model_filter.operator == operator
                  assert model_filter.value == str(value)
  
imports: from __future__ import absolute_import
  from unittest import TestCase
  from sagemaker.jumpstart.filters import FILTER_OPERATOR_STRING_MAPPINGS, And, BooleanValues, FilterOperators, Identity, ModelFilter, Not, Or, parse_filter_string
  from sagemaker.jumpstart.filters import evaluate_filter_expression
label_desc: Use image node_id 1 for calling a global function with example usage: test_parse_filter_string() without return types