code: def parse_object_spec(description: str) -> ObjectSpec:
      """
      Parse `description` into an `ObjectSpec`.
      `description` has the format:
          <class_name>:<key>=<value>,<key>=<value>
      Usually, the description is something that's succinct and can be typed on the command-line.
      Here, value defaults to string.
      """
  
      def parse_arg(arg: str) -> Tuple[str, Any]:
          if "=" not in arg:
              raise ValueError(f"Expected <key>=<value>, got '{arg}'")
          value: Any
          key, value = arg.split("=", 1)
  
          # Try to convert to number
          try:
              value = int(value)
          except ValueError:
              try:
                  value = float(value)
              except ValueError:
                  pass
  
          return (key, value)
  
      if ":" in description:
          name, args_str = description.split(":", 1)
          args: Dict[str, Any] = dict(
              parse_arg(arg) for arg in args_str.split(",")
          )
      else:
          name = description
          args = {}
      return ObjectSpec(name, args)
  
imports: from dataclasses import dataclass
  from typing import Any, Dict, Tuple
label_desc: Use image node_id 2 for calling a global function with example usage: parse_object_spec(description) and returns: ObjectSpec, key,  value