code: def set_save_directory(base, source):
      
      root = os.path.join(base, source)
      if not os.path.isdir(root):
          os.makedirs(root)
  
      world.screenshot_root = root
docs: Sets the root save directory for saving screenshots.
      
      Screenshots will be saved in subdirectories under this directory by
      browser window size.