code: def save_atlas_and_manifests(
      outdir, atlases, manifests, sprite_atlas_settings
  ):
      """Write atlases and manifests to local file. Handles multiple items.
  
      Args:
        outdir: full path to output directory
        atlases: List of sprite atlas PIL Image objects.
        manifests: List of manifests (list of dicts)
        sprite_atlas_settings: SpriteAtlasSettings object.
      """
      if len(atlases) == 1:
          save_image(
              atlases[0],
              os.path.join(
                  outdir,
                  # Filename with correct image format extension
                  "{}.{}".format(
                      sprite_atlas_settings.filename,
                      str(sprite_atlas_settings.img_format).lower(),
                  ),
              ),
          )
          _output_manifest(
              os.path.join(
                  outdir,
                  sprite_atlas_settings.manifest_filename + ".json",
              ),
              manifests[0],
          )
      else:
          for idx, atlas in enumerate(atlases):
              save_image(
                  atlas,
                  os.path.join(
                      outdir,
                      # Filename with correct image format extension
                      "{}{}.{}".format(
                          sprite_atlas_settings.filename,
                          str(idx),
                          str(sprite_atlas_settings.img_format).lower(),
                      ),
                  ),
              )
              _output_manifest(
                  os.path.join(
                      outdir,
                      sprite_atlas_settings.manifest_filename
                      + str(idx)
                      + ".json",
                  ),
                  manifests[idx],
              )
  
file_path: facets/facets_atlasmaker/atlasmaker_io.py
imports: import io
  import json
  import os
  import time
  import sys
  from absl import logging
  from PIL import Image
  import requests
  from requests.exceptions import Timeout
label_desc: Use image node_id 5 for calling a global function with example usage: save_atlas_and_manifests(outdir, atlases, manifests, sprite_atlas_settings) without return types