code: def _get_int_from_env(var_name: str) -> Optional[int]:
      value = os.getenv(var_name)
      if value is None:
          return None
  
      try:
          return int(value)
      except ValueError:
          raise RuntimeError(
              f"The value of the `{var_name}` environment variable must be an integer, but is '{value}' instead."
          )
  
imports: import logging
  import os
  from abc import ABC, abstractmethod
  from datetime import timedelta
  from enum import Enum
  from typing import Optional, final
  import torch
  import torch.distributed
  from torch import Tensor
  from torch.distributed import ProcessGroup, ReduceOp
  from fairseq2.typing import CPU, Device, finaloverride
label_desc: Use image node_id 6 for calling a global function with example usage: _get_int_from_env(var_name) and returns: None, int