code: def fix_brackets(placeholder: str) -> str:
      """Fix the imbalanced brackets in placeholder.
  
      When ptype is not null, regex matching might grab a placeholder with }
      missing. This function fix the missing bracket.
  
      Args:
        placeholder: string placeholder of RuntimeParameter
  
      Returns:
        Placeholder with re-balanced brackets.
  
      Raises:
        RuntimeError: if left brackets are less than right brackets.
      """
      lcount = placeholder.count("{")
      rcount = placeholder.count("}")
      if lcount < rcount:
          raise RuntimeError(
              "Unexpected redundant left brackets found in {}".format(
                  placeholder
              )
          )
      else:
          patch = "".join(["}"] * (lcount - rcount))
          return placeholder + patch
  
imports: from tfx.dsl.components.base import base_node
  from tfx.orchestration.kubeflow.decorators import FinalStatusStr
label_desc: Use image node_id 2 for calling a global function with example usage: fix_brackets(placeholder) and returns: unknown