code: def _shuffle_subset(
      data: torch.Tensor, shuffle_prop: float
  ) -> torch.Tensor:
      to_shuffle = np.nonzero(
          np.random.rand(data.shape[0]) < shuffle_prop
      )[0]
      data[to_shuffle, ...] = data[
          np.random.permutation(to_shuffle), ...
      ]
      return data
  
file_path: baal/baal/active/heuristics/heuristics_gpu.py
imports: from typing import Callable, Optional, Sequence
  import numpy
  import torch
  import torch.nn.functional
  from baal.active.dataset.base import Dataset
  from baal import ModelWrapper
label_desc: Use image node_id 1 for calling a global function with example usage: _shuffle_subset(data, shuffle_prop) and returns: data