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