code: def _expect_int(value, msg=None):
      try:
          return int(value)
      except ValueError as e:
          if msg is None:
              msg = "Expected an int, got %s"
          raise ValueError(msg % value) from e
  
imports: import warnings
  import numpy
  from scipy.sparse import csc_matrix
  from ._fortran_format_parser import FortranFormatParser, IntFormat, ExpFormat
label_desc: Use image node_id 2 for calling a global function with example usage: _expect_int(value, msg) and returns: int