code: def obtainSubsequentIndexFromVersionName(self, versionNames) -> int:
      if len(versionNames) == 0:
          return 1
      lastVersionTag = versionNames[len(versionNames) - 1]
      if lastVersionTag == self.FINAL or lastVersionTag == self.ORIGIN:
          return 1
      try:
          indexOfDelimeter = lastVersionTag.index("_")
      except:
          exceptionIndex = len(versionNames) + 100
          logging.info(
              "Version name is incorrect. Format should be like 'version_1' but was {}. Hence, following id will be used {}.".format(
                  lastVersionTag, exceptionIndex
              )
          )
          return exceptionIndex
  
      lastCharIndex = len(lastVersionTag)
      versionTagIndex = lastVersionTag[
          indexOfDelimeter + 1 : lastCharIndex
      ]
      return int(versionTagIndex) + 1
  
imports: import logging
  from datetime import datetime
  from typing import Dict, List
  from MONAILabelReviewerLib.MONAILabelReviewerEnum import SegStatus
  from MONAILabelReviewerLib.SegmentationMeta import SegmentationMeta
label_desc: Use image node_id 48 for calling the ImageData obj's underlying member method code with example usage: obj.obtainSubsequentIndexFromVersionName(versionNames) and returns: unknown, int, int, exceptionIndex