def compute_sequence_shape(context, builder, ndim, seqty, seq):
    intp_t = context.get_value_type(types.intp)
    zero = Constant.int(intp_t, 0)

    def get_first_item(seqty, seq):
        if isinstance(seqty, types.BaseTuple):
            if len(seqty) == 0:
                return None, None
            else:
                return seqty[0], builder.extract_value(seq, 0)
        else:
            getitem_impl = _get_borrowing_getitem(context, seqty)
            return seqty.dtype, getitem_impl(builder, (seq, zero))

    # Compute shape by traversing the first element of each nested
    # sequence
    shapes = []
    innerty, inner = seqty, seq

    for i in range(ndim):
        shapes.append(_get_seq_size(context, builder, innerty, inner))
        innerty, inner = get_first_item(innerty, inner)

    return tuple(shapes)
Gets a list of all domains, or optionally a page of domains.
dataset/ETHPy150Open numba/numba/numba/targets/arrayobj.py/compute_sequence_shape--crossover with--dataset/ETHPy150Open rackspace/pyrax/pyrax/clouddns.py/CloudDNSManager.list