code: def _get_pixels(
      per_pixel: bool,
      rand_color: bool,
      patch_size: Tuple[int],
      dtype: torch.dtype = torch.float32,
      device: str = "cuda",
  ) -> torch.Tensor:
      """
      A utility function that generates image patches for RandomErasing transform
      """
      if per_pixel:
          return torch.empty(
              patch_size, dtype=dtype, device=device
          ).normal_()
      elif rand_color:
          return torch.empty(
              (patch_size[0], 1, 1), dtype=dtype, device=device
          ).normal_()
      else:
          return torch.zeros(
              (patch_size[0], 1, 1), dtype=dtype, device=device
          )
  
file_path: pytorchvideo/pytorchvideo_trainer/pytorchvideo_trainer/datamodule/rand_erase_transform.py
imports: import math
  import random
  from typing import Optional, Tuple
  import torch
label_desc: Use image node_id 1 for calling a global function with example usage: _get_pixels(per_pixel, rand_color, patch_size, dtype, device) and returns: torch, torch, torch