code: def get_samples_in_play_order():
      ext = os.path.splitext(CLI_ARGS.source)[1].lower()
      if get_loadable_audio_type_from_extension(ext):
          samples = SampleList([(CLI_ARGS.source, 0)], labeled=False)
      else:
          samples = samples_from_source(CLI_ARGS.source, buffering=0)
      played = 0
      index = CLI_ARGS.start
      while True:
          if 0 <= CLI_ARGS.number <= played:
              return
          if CLI_ARGS.random:
              yield samples[random.randint(0, len(samples) - 1)]
          elif index < 0:
              yield samples[len(samples) + index]
          elif index >= len(samples):
              print("No sample with index {}".format(CLI_ARGS.start))
              sys.exit(1)
          else:
              yield samples[index]
          played += 1
          index = (index + 1) % len(samples)
  
file_path: DeepSpeech/bin/play.py
imports: import os
  import sys
  import random
  import argparse
  from deepspeech_training.util.audio import get_loadable_audio_type_from_extension, AUDIO_TYPE_PCM, AUDIO_TYPE_WAV
  from deepspeech_training.util.sample_collections import SampleList, LabeledSample, samples_from_source
  from deepspeech_training.util.augmentations import parse_augmentations, apply_sample_augmentations, SampleAugmentation
label_desc: Use image node_id 1 for calling a global function with example usage: get_samples_in_play_order() without return types