code: def vformat(self, format_string, args, kwargs):
      args_len = len(args)  # for checking IndexError
      tokens = []
      for lit, name, spec, conv in self.parse(format_string):
          # re-escape braces that parse() unescaped
          lit = lit.replace("{", "{{").replace("}", "}}")
          # only lit is non-None at the end of the string
          if name is None:
              tokens.append(lit)
          else:
              # but conv and spec are None if unused
              conv = "!" + conv if conv else ""
              spec = ":" + spec if spec else ""
              # name includes indexing ([blah]) and attributes (.blah)
              # so get just the first part
              fp = name.split("[")[0].split(".")[0]
              # treat as normal if fp is empty (an implicit
              # positional arg), a digit (an explicit positional
              # arg) or if it is in kwargs
              if not fp or fp.isdigit() or fp in kwargs:
                  tokens.extend([lit, "{", name, conv, spec, "}"])
              # otherwise escape the braces
              else:
                  tokens.extend([lit, "{{", name, conv, spec, "}}"])
      format_string = "".join(tokens)  # put the string back together
      # finally call the default formatter
      return string.Formatter.vformat(self, format_string, args, kwargs)
  
imports: import collections
  import itertools
  import string
  import numpy
  import re
  import copy
  import os
  import json
  import munch
  import pickle
  import csv
  from .viewer.template_editor import TemplateEditor
  from .multilingual import multilingual_params, get_language_code
label_desc: Use image node_id 1 for calling the SafeFormatter obj's underlying member method code with example usage: obj.vformat(format_string, args, kwargs) and returns: string