code: def create_zip_directories(zipfile, path=None):
      try:
          path = os.getcwd() if path is None else os.fspath(path)
          for member in zipfile.namelist():
              arcname = member.replace("/", os.path.sep)
              if os.path.altsep:
                  arcname = arcname.replace(os.path.altsep, os.path.sep)
              # interpret absolute pathname as relative, remove drive letter or
              # UNC path, redundant separators, "." and ".." components.
              arcname = os.path.splitdrive(arcname)[1]
              invalid_path_parts = ("", os.path.curdir, os.path.pardir)
              arcname = os.path.sep.join(
                  x
                  for x in arcname.split(os.path.sep)
                  if x not in invalid_path_parts
              )
              if os.path.sep == "\\":
                  # noinspection PyBroadException
                  try:
                      # filter illegal characters on Windows
                      # noinspection PyProtectedMember
                      arcname = zipfile._sanitize_windows_name(
                          arcname, os.path.sep
                      )
                  except Exception:
                      pass
  
              targetpath = os.path.normpath(os.path.join(path, arcname))
  
              # Create all upper directories if necessary.
              upperdirs = os.path.dirname(targetpath)
              if upperdirs:
                  os.makedirs(upperdirs, exist_ok=True)
      except Exception as e:
          LoggerRoot.get_base_logger().warning(
              "Failed creating zip directories: " + str(e)
          )
  
imports: import fnmatch
  import hashlib
  import json
  import os
  import re
  import sys
  from typing import Optional, Union, Sequence, Dict
  from zlib import crc32
  import six
  from pathlib2 import Path
  from six.moves.urllib.parse import quote, urlparse, urlunparse
  from ..debugging.log import LoggerRoot
label_desc: Use image node_id 14 for calling a global function with example usage: create_zip_directories(zipfile, path) without return types