class_docstr: Base class for all decorators.
class_docstr_tok: ["Base","class","for","all","decorators","."]
code: def _parse_decorator_spec(cls, deco_spec):
      if len(deco_spec) == 0:
          return cls()
  
      attrs = {}
      # TODO: Do we really want to allow spaces in the names of attributes?!?
      for a in re.split(r""",(?=[\s\w]+=)""", deco_spec):
          name, val = a.split("=", 1)
          try:
              val_parsed = json.loads(val.strip().replace('\\"', '"'))
          except json.JSONDecodeError:
              # In this case, we try to convert to either an int or a float or
              # leave as is. Prefer ints if possible.
              try:
                  val_parsed = int(val.strip())
              except ValueError:
                  try:
                      val_parsed = float(val.strip())
                  except ValueError:
                      val_parsed = val.strip()
  
          attrs[name.strip()] = val_parsed
      return cls(attributes=attrs)
  
imports: from functools import partial
  import json
  import re
  import os
  import sys
  from .flowspec import FlowSpec
  from .exception import MetaflowInternalError, MetaflowException, InvalidDecoratorAttribute
  from metaflow._vendor import click
label_desc: Use image node_id 2 for calling the Decorator obj's underlying member method code with example usage: obj._parse_decorator_spec(cls, deco_spec) and returns: cls, cls