code: def handleMatch(
      self, m: re.Match[str], data: str
  ) -> tuple[str, int, int]:
      result = ""
      for part in self.replace:
          if isinstance(part, int):
              result += m.group(part)
          else:
              result += self.md.htmlStash.store(part)
      return result, m.start(0), m.end(0)
  
file_path: markdown/markdown/extensions/smarty.py
imports: from __future__ import annotations
  from .None import Extension
  from ..inlinepatterns import HtmlInlineProcessor, HTML_RE
  from ..treeprocessors import InlineProcessor
  from ..util import Registry
  from typing import TYPE_CHECKING, Sequence
label_desc: Use image node_id 2 for calling the SubstituteTextPattern obj's underlying member method code with example usage: obj.handleMatch(m, data) and returns: result,  m,  m