class_docstr: FullShuffle shuffles the chunks and associates them to the ranks.
  
  As the number of items in a chunk varies, it is possible for a rank to end up with more or less items.
  
  To ensure the same fixed dataset length for all ranks while dropping as few items as possible,
  
  we adopt the following strategy.
  
  We compute the maximum number of items per rank (M) and iterate through the chunks and ranks
  
  until we have associated at least M items per rank.
  
  As a result, we lose at most (number of ranks) items. However, as some chunks are shared across ranks. This leads to
  the same chunk to be downloaded multiple times.
class_docstr_tok: ["FullShuffle","shuffles","the","chunks","and","associates","them","to","the","ranks",".","As","the","number","of","items","in","a","chunk","varies",",","it","is","possible","for","a","rank","to","end","up","with","more","or","less","items",".","To","ensure","the","same","fixed","dataset","length","for","all","ranks","while","dropping","as","few","items","as","possible",",","we","adopt","the","following","strategy",".","We","compute","the","maximum","number","of","items","per","rank","(","M",")","and","iterate","through","the","chunks","and","ranks","until","we","have","associated","at","least","M","items","per","rank",".","As","a","result",",","we","lose","at","most","(","number","of","ranks",")","items",".","However",",","as","some","chunks","are","shared","across","ranks",".","This","leads","to","the","same","chunk","to","be","downloaded","multiple","times","."]
code: def __call__(
      self,
      array: np.ndarray,
      num_chunks: int,
      current_epoch: int,
      chunk_index: int,
  ) -> List[int]:
      return (
          np.random.RandomState(
              [self.seed, num_chunks * current_epoch, chunk_index]
          )
          .permutation(array)
          .tolist()
      )
  
file_path: pytorch-lightning/src/lightning/data/streaming/shuffle.py
imports: from abc import ABC, abstractmethod
  from functools import lru_cache
  from typing import Any, List, Tuple
  import numpy
  from lightning.data.streaming import Cache
  from lightning.data.utilities.env import _DistributedEnv
label_desc: Use image node_id 2 for calling the FullShuffle obj's underlying member method code with example usage: obj.__call__(array, num_chunks, current_epoch, chunk_index) and returns: np