code: def add_epoch_number(batch: Batch, epoch: int) -> Batch:
      
      for instance in batch.instances:
          instance.fields['epoch_num'] = MetadataField(epoch)
      return batch
docs: Add the epoch number to the batch instances as a MetadataField.