def get_min_max_ring_sizes(mol):
    """Return a tuple wih (minimum, maximum) ring sizes of the input molecule.
    In case the molecule is linear, (0, 0) is returned.
    """
    ring_sizes = [len(x) for x in mol.GetRingInfo().AtomRings()]
    if len(ring_sizes) > 0:
        min_ring_size = min(ring_sizes)
        max_ring_size = max(ring_sizes)
    else:
        min_ring_size = 0
        max_ring_size = 0

    return (min_ring_size, max_ring_size)