code: def parse_filter_string(filter_string: str) -> ModelFilter:
      """Parse filter string and return a serialized ``ModelFilter`` object.
  
      Args:
          filter_string (str): The filter string to be serialized to an object.
      """
  
      for operator in ACCEPTABLE_OPERATORS_IN_PARSE_ORDER:
          split_filter_string = filter_string.split(operator)
          if len(split_filter_string) == 2:
              return ModelFilter(
                  key=split_filter_string[0].strip(),
                  value=split_filter_string[1].strip(),
                  operator=operator.strip(),
              )
      raise ValueError(f"Cannot parse filter string: {filter_string}")
  
imports: from __future__ import absolute_import
  from ast import literal_eval
  from enum import Enum
  from typing import Dict, List, Optional, Union, Any
  from sagemaker.jumpstart.types import JumpStartDataHolderType
label_desc: Use image node_id 1 for calling a global function with example usage: parse_filter_string(filter_string) and returns: ModelFilter