'unrank using Schreier-Sims representation
coset_unrank is the inverse operation of coset_rank
if 0 <= rank < order; otherwise it returns None.'

def coset_unrank(self, rank, af=False):

    if ((rank < 0) or (rank >= self.order())):
        return None
    base = self.base
    transversals = self.basic_transversals
    basic_orbits = self.basic_orbits
    m = len(base)
    v = ([0] * m)
    for i in range(m):
        (rank, c) = divmod(rank, len(transversals[i]))
        v[i] = basic_orbits[i][c]
    a = [transversals[i][v[i]]._array_form for i in range(m)]
    h = _af_rmuln(*a)
    if af:
        return h
    else:
        return _af_new(h)
