code: def _get_subject_info(self, n_local_subj, data):
          
  
          max_sample_tr = np.zeros(n_local_subj).astype(int)
          max_sample_voxel = np.zeros(n_local_subj).astype(int)
          for idx in np.arange(n_local_subj):
              nvoxel = data[idx].shape[0]
              ntr = data[idx].shape[1]
              max_sample_voxel[idx] =\
                  min(self.max_voxel, int(self.voxel_ratio * nvoxel))
              max_sample_tr[idx] = min(self.max_tr, int(self.tr_ratio * ntr))
          return max_sample_tr, max_sample_voxel
docs: Calculate metadata for subjects allocated to this process
  
          Parameters
          ----------
  
          n_local_subj : int
              Number of subjects allocated to this process.
  
          data : list of 2D array. Each in shape [n_voxel, n_tr]
              Total number of MPI process.
  
          Returns
          -------
  
          max_sample_tr : 1D array
              Maximum number of TR to subsample for each subject
  
          max_sample_voxel : 1D array
              Maximum number of voxel to subsample for each subject