code: def init_from_ckpt(self, path, ignore_keys=list()):
      sd = torch.load(path, map_location="cpu")["state_dict"]
      keys = list(sd.keys())
      for k in keys:
          for ik in ignore_keys:
              if k.startswith(ik):
                  print("Deleting key {} from state_dict.".format(k))
                  del sd[k]
      missing, unexpected = self.load_state_dict(sd, strict=False)
      print(
          f"Restored from {path} with {len(missing)} missing and {len(unexpected)} unexpected keys"
      )
      if len(missing) > 0:
          print(f"Missing Keys: {missing}")
          print(f"Unexpected Keys: {unexpected}")
  
imports: import torch
  import pytorch_lightning
  import torch.nn.functional
  from contextlib import contextmanager
  from taming.modules.vqvae.quantize import VectorQuantizer2
  from ldm.modules.diffusionmodules.model import Encoder, Decoder
  from ldm.modules.distributions.distributions import DiagonalGaussianDistribution
  from ldm.util import instantiate_from_config
label_desc: Use image node_id 3 for calling the VQModel obj's underlying member method code with example usage: obj.init_from_ckpt(path, ignore_keys) without return types