def _scala_seq_to_py(jseq):
    """Generator for all elements in a Scala sequence.

    Parameters
    ----------
    jseq : Scala Seq
        Scala sequence

    Yields
    ------
    any
        One element per sequence
    """
    n = jseq.size()
    for i in range(n):
        yield jseq.apply(i)
