code: def _prepare_batch(
      batch: Sequence[torch.Tensor],
      device: Optional[Union[str, torch.device]] = None,
      non_blocking: bool = False,
  ) -> Tuple[Union[torch.Tensor, Sequence, Mapping, str, bytes], ...]:
      """Prepare batch for training or evaluation: pass to a device with options."""
      x, y = batch
      return (
          convert_tensor(x, device=device, non_blocking=non_blocking),
          convert_tensor(y, device=device, non_blocking=non_blocking),
      )
  
file_path: ignite/ignite/engine/__init__.py
imports: from collections.abc import Mapping
  from typing import Any, Callable, Dict, Optional, Sequence, Tuple, Union
  import torch
  import ignite.distributed
  from ignite.engine.deterministic import DeterministicEngine
  from ignite.engine.engine import Engine
  from ignite.engine.events import CallableEventWithFilter, EventEnum, Events, EventsList, RemovableEventHandle, State
  from ignite.metrics import Metric
  from ignite.utils import convert_tensor
label_desc: Use image node_id 1 for calling a global function with example usage: _prepare_batch(batch, device, non_blocking) and returns: convert_tensor,  convert_tensor