code: def _unparse_key(parsed: list[t.Any]) -> str:
      bits: list[str] = []
      for part in parsed:
          if isinstance(part, string_type):
              if part.isidentifier():
                  fmt = ".%s" if bits else "%s"
              elif part == "":
                  fmt = ".%s" if bits else "%s"
              else:
                  fmt = '."%s"' if bits else '"%s"'
          else:
              fmt = "[%d]"
          bits.append(fmt % part)
      return "".join(bits)
  
imports: from __future__ import absolute_import
  from __future__ import annotations
  import re
  import sys
  import typing
  from operator import itemgetter
label_desc: Use image node_id 4 for calling a global function with example usage: _unparse_key(parsed) and returns: str