code: def _extract_snapshot_itr(filename: str) -> int:
      """Extracts the integer itr from a filename.
  
      Args:
          filename(str): The snapshot filename.
  
      Returns:
          int: The snapshot as an integer.
  
      """
      base = os.path.splitext(filename)[0]
      digits = base.split("itr_")[1]
      return int(digits)
  
file_path: garage/src/garage/experiment/snapshotter.py
imports: import collections
  import errno
  import os
  import pathlib
  import cloudpickle
label_desc: Use image node_id 1 for calling a global function with example usage: _extract_snapshot_itr(filename) and returns: int