code: def _extract_consumed_samples_from_ckpt(self, ckpt_path):
      try:
          init_consumed_samples = int(
              float(
                  re.findall(
                      r"consumed_samples\=([0-9]+.[0-9]+)", ckpt_path
                  )[0]
              )
          )
      except (ValueError, TypeError, IndexError):
          logging.warning(
              "Cannot parse the checkpoint file to get the consumed samples. assume it is zero."
          )
          init_consumed_samples = 0
  
      return init_consumed_samples
  
file_path: NeMo/nemo/collections/multimodal/models/text_to_image/stable_diffusion/diffusion_model.py
imports: import re
  from abc import ABC, abstractclassmethod
  from typing import Any, Optional
  import torch
  from nemo.core.classes import ModelPT
  from nemo.utils import logging
label_desc: Use image node_id 4 for calling the DiffusionModel obj's underlying member method code with example usage: obj._extract_consumed_samples_from_ckpt(ckpt_path) and returns: init_consumed_samples