code: def save_as_prompt(filepath, full_generation):
      assert filepath.endswith(".npz")
      assert isinstance(full_generation, dict)
      assert "semantic_prompt" in full_generation
      assert "coarse_prompt" in full_generation
      assert "fine_prompt" in full_generation
      np.savez(filepath, **full_generation)
  
imports: from typing import Dict, Optional, Union
  import numpy
  from .generation import codec_decode, generate_coarse, generate_fine, generate_text_semantic
label_desc: Use image node_id 3 for calling a global function with example usage: save_as_prompt(filepath, full_generation) without return types