code: def _is_epoch_done(
      progress: Progress,
      max_steps_per_epoch: Optional[int],
      max_steps: Optional[int],
  ) -> bool:
      return (
          max_steps is not None
          and progress.num_steps_completed >= max_steps
      ) or (
          max_steps_per_epoch is not None
          and progress.num_steps_completed_in_epoch
          >= max_steps_per_epoch
      )
  
file_path: tnt/torchtnt/framework/_loop_utils.py
imports: import collections
  import inspect
  import logging
  from typing import Callable, Dict, Iterable, Optional, TypeVar
  import torch
  import torch.nn
  import typing_extensions
  from torchtnt.framework.state import State
  from torchtnt.utils.progress import Progress
label_desc: Use image node_id 2 for calling a global function with example usage: _is_epoch_done(progress, max_steps_per_epoch, max_steps) and returns: unknown