code: def register(subparser: _SubParsersAction[ArgumentParser]) -> None:
      sub = subparser.add_parser("images.generate")
      sub.add_argument("-p", "--prompt", type=str, required=True)
      sub.add_argument("-n", "--num-images", type=int, default=1)
      sub.add_argument(
          "-s",
          "--size",
          type=str,
          default="1024x1024",
          help="Size of the output image",
      )
      sub.add_argument("--response-format", type=str, default="url")
      sub.set_defaults(
          func=CLIImage.create, args_model=CLIImageCreateArgs
      )
  
      sub = subparser.add_parser("images.edit")
      sub.add_argument("-p", "--prompt", type=str, required=True)
      sub.add_argument("-n", "--num-images", type=int, default=1)
      sub.add_argument(
          "-I",
          "--image",
          type=str,
          required=True,
          help="Image to modify. Should be a local path and a PNG encoded image.",
      )
      sub.add_argument(
          "-s",
          "--size",
          type=str,
          default="1024x1024",
          help="Size of the output image",
      )
      sub.add_argument("--response-format", type=str, default="url")
      sub.add_argument(
          "-M",
          "--mask",
          type=str,
          required=False,
          help="Path to a mask image. It should be the same size as the image you're editing and a RGBA PNG image. The Alpha channel acts as the mask.",
      )
      sub.set_defaults(func=CLIImage.edit, args_model=CLIImageEditArgs)
  
      sub = subparser.add_parser("images.create_variation")
      sub.add_argument("-n", "--num-images", type=int, default=1)
      sub.add_argument(
          "-I",
          "--image",
          type=str,
          required=True,
          help="Image to modify. Should be a local path and a PNG encoded image.",
      )
      sub.add_argument(
          "-s",
          "--size",
          type=str,
          default="1024x1024",
          help="Size of the output image",
      )
      sub.add_argument("--response-format", type=str, default="url")
      sub.set_defaults(
          func=CLIImage.create_variation,
          args_model=CLIImageCreateVariationArgs,
      )
  
file_path: openai-python/src/openai/cli/_api/image.py
imports: from __future__ import annotations
  from typing import TYPE_CHECKING, Any, cast
  from argparse import ArgumentParser
  from .._utils import get_client, print_model
  from ..._types import NOT_GIVEN, NotGiven, NotGivenOr
  from .._models import BaseModel
  from .._progress import BufferReader
label_desc: Use image node_id 1 for calling a global function with example usage: register(subparser) without return types