code: def _get_trainer_idx_from_epoch(self) -> int:
      # Cycling through the trainers
      epoch = (self.trainer.current_epoch - self._starting_epoch) % (
          self._trainer_acc_epochs[-1]
      )
      trainer_idx = (
          bisect.bisect_right(self._trainer_acc_epochs, epoch) - 1
      )
  
      return trainer_idx
  
imports: import bisect
  import functools
  import itertools
  from collections import OrderedDict
  from typing import Dict, List, Tuple
  import torch.nn
  from pytorch_lightning.loops.optimization.optimizer_loop import ClosureResult
  from reagent.core.utils import lazy_property
  from .reagent_lightning_module import ReAgentLightningModule
label_desc: Use image node_id 10 for calling the MultiStageTrainer obj's underlying member method code with example usage: obj._get_trainer_idx_from_epoch() and returns: trainer_idx