code: def train(
      model: torch.nn.Module,
      optimizer: Optional[torch.optim.Optimizer],
      dataset: IterableDataset[Batch],
      device: torch.device,
      epochs: int = 100,
  ) -> Tuple[float, float]:
      training_time = []
      for _ in range(epochs):
          if optimizer:
              training_time.append(
                  train_one_epoch(model, optimizer, dataset, device)
              )
          else:
              training_time.append(
                  train_one_epoch_fused_optimizer(
                      model, dataset, device
                  )
              )
  
      return np.mean(training_time), np.std(training_time)
  
file_path: torchrec/benchmarks/ebc_benchmarks_utils.py
imports: import time
  from typing import Dict, List, Optional, Tuple
  import numpy
  import torch
  from torch.utils.data.dataset import IterableDataset
  from torchrec.datasets.random import RandomRecDataset
  from torchrec.datasets.utils import Batch
  from torchrec.modules.embedding_configs import EmbeddingBagConfig
label_desc: Use image node_id 4 for calling a global function with example usage: train(model, optimizer, dataset, device, epochs) and returns: np,  np