code: def get_eids_by_rlz(self, rlzs_by_gsim):
          
          j = 0
          dic = {}
          if self.samples == 1:  # full enumeration or akin to it
              for rlzs in rlzs_by_gsim.values():
                  for rlz in rlzs:
                      dic[rlz] = numpy.arange(j, j + self.n_occ, dtype=U64) + (
                          TWO32 * U64(self.serial))
                      j += self.n_occ
          else:  # associated eids to the realizations
              rlzs = numpy.concatenate(list(rlzs_by_gsim.values()))
              assert len(rlzs) == self.samples, (len(rlzs), self.samples)
              histo = general.random_histogram(
                  self.n_occ, self.samples, self.serial)
              for rlz, n in zip(rlzs, histo):
                  dic[rlz] = numpy.arange(j, j + n, dtype=U64) + (
                      TWO32 * U64(self.serial))
                  j += n
          return dic
docs: :param n_occ: number of occurrences
          :params rlzs_by_gsim: a dictionary gsims -> rlzs array
          :param samples: number of samples in current source group
          :returns: a dictionary rlz index -> eids array