code: def partition(ds):
      items = []
      for idx, item in enumerate(ds):
          if idx % 2 == 0:
              yield [item]
          else:
              items.append(item)
              if get_duration(items) > 20:
                  yield items
                  items = []
      if items:
          yield items
  
file_path: espnet/egs2/reazonspeech/asr1/local/data.py
imports: import getopt
  import glob
  import os
  import random
  import shlex
  import sys
  from datasets import load_dataset
label_desc: Use image node_id 4 for calling a global function with example usage: partition(ds) without return types