code: def __init__(
      self,
      resume,
      now,
      logdir,
      ckptdir,
      cfgdir,
      config,
      lightning_config,
      debug,
      ckpt_name=None,
  ):
      super().__init__()
      self.resume = resume
      self.now = now
      self.logdir = logdir
      self.ckptdir = ckptdir
      self.cfgdir = cfgdir
      self.config = config
      self.lightning_config = lightning_config
      self.debug = debug
      self.ckpt_name = ckpt_name
  
imports: import argparse
  import datetime
  import glob
  import inspect
  import os
  import sys
  from inspect import Parameter
  from typing import Union
  import numpy
  import pytorch_lightning
  import torch
  import torchvision
  import wandb
  from matplotlib import pyplot
  from natsort import natsorted
  from omegaconf import OmegaConf
  from packaging import version
  from PIL import Image
  from pytorch_lightning import seed_everything
  from pytorch_lightning.callbacks import Callback
  from pytorch_lightning.loggers import WandbLogger
  from pytorch_lightning.trainer import Trainer
  from pytorch_lightning.utilities import rank_zero_only
  from sgm.util import exists, instantiate_from_config, isheatmap
label_desc: Use image node_id 1 to create a new SetupCallback object from inherited base classes: Callback with example: obj = SetupCallback(resume, now, logdir, ckptdir, cfgdir, config, lightning_config, debug, ckpt_name)