Find all groups

def _find_all_groups(items, require_bam=True):
    """Find all groups
    """
    all_groups = []
    for data in items:
        batches = _get_batches(data, require_bam)
        all_groups.append(batches)
    return all_groups