code: def _get_random_index(x: torch.Tensor) -> torch.Tensor:
      """Given a tensor it compute random indices between 0 and the number of the first dimension.
  
      :param x: Tensor used to get the number of rows
      """
      batch_size = x.size()[0]
      index = torch.randperm(batch_size)
      return index
  
imports: from typing import Dict
  import numpy
  import torch
label_desc: Use image node_id 3 for calling a global function with example usage: _get_random_index(x) and returns: index