code: def get_random_tensor_frame(
      num_rows: int,
      device: Optional[torch.device] = None,
  ) -> TensorFrame:
      feat_dict = {
          torch_frame.categorical: torch.randint(
              0, 3, size=(num_rows, 3), device=device
          ),
          torch_frame.numerical: torch.randn(
              size=(num_rows, 2), device=device
          ),
      }
      col_names_dict = {
          torch_frame.categorical: ["a", "b", "c"],
          torch_frame.numerical: ["x", "y"],
      }
      y = torch.randn(num_rows, device=device)
  
      return torch_frame.TensorFrame(
          feat_dict=feat_dict,
          col_names_dict=col_names_dict,
          y=y,
      )
  
file_path: pytorch_geometric/torch_geometric/testing/data.py
imports: from typing import Callable, Optional
  import torch
  from torch import Tensor
  from torch_geometric.data import HeteroData, InMemoryDataset
  from torch_geometric.typing import TensorFrame, torch_frame
  from torch_geometric.utils import coalesce
label_desc: Use image node_id 2 for calling a global function with example usage: get_random_tensor_frame(num_rows, device) and returns: torch_frame