<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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