code: def writePlist(value, path_or_file):
      did_open = False
      if isinstance(path_or_file, str):
          path_or_file = open(path_or_file, "wb")
          did_open = True
      try:
          dump(value, path_or_file, use_builtin_types=False)
      finally:
          if did_open:
              path_or_file.close()
  
imports: from fontTools.misc.plistlib import dump, dumps, load, loads
  from fontTools.misc.textTools import tobytes
  from fontTools.ufoLib.utils import deprecated
label_desc: Use image node_id 2 for calling a global function with example usage: writePlist(value, path_or_file) without return types