class_docstr: Helper object for parsing filenames that are potentially checkpoints
class_docstr_tok: ["Helper","object","for","parsing","filenames","that","are","potentially","checkpoints"]
docstr: Tries to parse the filename using the checkpoint filename pattern. If successful,
  it returns tuple of (checkpoint-number, checkpoint-name). Otherwise it returns None.
  :param filename: filename to be parsed
  :return: None or (checkpoint-number, checkpoint-name)
docstr_tok: ["Tries","to","parse","the","filename","using","the","checkpoint","filename","pattern",".","If","successful",",","it","returns","tuple","of","(","checkpoint-number",",","checkpoint-name",")",".","Otherwise","it","returns","None",".",":","param","filename",":","filename","to","be","parsed",":","return",":","None","or","(","checkpoint-number",",","checkpoint-name",")"]
code: def parse(self, filename: str) -> Union[None, SingleCheckpoint]:
      """
      Tries to parse the filename using the checkpoint filename pattern. If successful,
      it returns tuple of (checkpoint-number, checkpoint-name). Otherwise it returns None.
      :param filename: filename to be parsed
      :return: None or (checkpoint-number, checkpoint-name)
      """
      m = self._prog.search(filename)
      if m is not None and (
          m.group(2) is not None or m.group(4) is not None
      ):
          assert (
              m.group(2) is None or m.group(4) is None
          )  # Only one group must be valid
          checkpoint_num = int(
              m.group(2) if m.group(2) is not None else m.group(4)
          )
          return SingleCheckpoint(checkpoint_num, m.group(0))
      return None
  
imports: import os
  import re
  from typing import List, Union, Tuple
label_desc: Use image node_id 2 for calling the CheckpointFilenameParser obj's underlying member method code with example usage: obj.parse(filename) and returns: None, SingleCheckpoint