def get_fresh_groups():
    """Return two groups ready for testing."""
    ### instantiate groups
    g1, g2 = ListGroup(), ListGroup()

    ### populate and return them

    g1.extend(
        (
            Simple(Rect(0, 0, 20, 20)),
            Simple(Rect(10, 10, 20, 20)),
            Simple(Rect(10, -10, 20, 20)),
            Simple(Rect(20, 20, 20, 20)),
        )
    )

    g2.extend(
        (
            Simple(Rect(100, 0, 20, 20)),
            Simple(Rect(110, 10, 20, 20)),
            Simple(Rect(90, 20, 20, 20)),
            Simple(Rect(130, 0, 20, 20)),
        )
    )

    return g1, g2
Return two groups ready for testing.
nodezator/rectsman/doctests/fixtures.py