code: def _load(cls, path):
          
          bytesIO = BytesIO()
          initfile = os.path.join(path, '__init__.py')
          if os.path.isfile(initfile):
              # This is a package directory. To emulate
              # PyZipFile.writepy's behavior, we need to keep everything
              # relative to this path's parent directory.
              rootDir = os.path.dirname(path)
          else:
              # This is a simple user script (with possibly a few helper files)
              rootDir = path
          with ZipFile(file=bytesIO, mode='w') as zipFile:
              for dirName, _, fileList in os.walk(path):
                  for fileName in fileList:
                      fullPath = os.path.join(dirName, fileName)
                      zipFile.write(fullPath, os.path.relpath(fullPath, rootDir))
          bytesIO.seek(0)
          return bytesIO
docs: :type path: str