code: def generate_random_square_image_tensor(
      num_channels: int, side_length: int
  ) -> torch.Tensor:
      """
      Generate a random tensor with the given image dimensions.
  
      Args:
          num_channels (int): Number of channels for the random square image.
          side_length (int): Side length of the random square image.
  
      Returns:
          torch.Tensor: Randomly generated tensor with shape [num_channels, side_length, side_length].
  
      Raises:
          ValueError: If num_channels or side_length is not greater than zero.
      """
      if num_channels <= 0:
          raise ValueError(
              f"num_channels must be greater than zero. Received: {num_channels}"
          )
      if side_length <= 0:
          raise ValueError(
              f"side_length must be greater than zero. Received: {side_length}"
          )
  
      return torch.rand(
          num_channels,
          side_length,
          side_length,
          device=get_device_from_env(),
      )
  
file_path: tnt/torchtnt/utils/data/synthetic_data.py
imports: from __future__ import annotations
  import abc
  import logging
  from dataclasses import dataclass, field
  from typing import Dict
  import torch
  from torch.utils.data import Dataset
  from torchtnt.utils.device import get_device_from_env
label_desc: Use image node_id 1 for calling a global function with example usage: generate_random_square_image_tensor(num_channels, side_length) and returns: torch