code: def listdir(path):
      """Replacement for os.listdir that works in frozen environments."""
      if not hasattr(sys, "frozen"):
          return os.listdir(path)
  
      (zipPath, archivePath) = splitZip(path)
      if archivePath is None:
          return os.listdir(path)
  
      with zipfile.ZipFile(zipPath, "r") as zipobj:
          contents = zipobj.namelist()
      results = set()
      for name in contents:
          # components in zip archive paths are always separated by forward slash
          if name.startswith(archivePath) and len(name) > len(
              archivePath
          ):
              name = name[len(archivePath) :].split("/")[0]
              results.add(name)
      return list(results)
  
imports: import os
  import sys
  import zipfile
label_desc: Use image node_id 1 for calling a global function with example usage: listdir(path) and returns: list, os, os