code: def _get_sentences(
      response, verbose=False, min_start=15, max_length=250
  ):
      # no mutations of characters allowed here, only breaking apart or merging
      import nltk
  
      # refuse to tokenize first 15 characters into sentence, so language detection works and logic simpler
      sentences = nltk.sent_tokenize(response[min_start:])
      # split any long sentences
      sentences = flatten_list(
          [split_sentences(x, max_length) for x in sentences]
      )
      # drop empty sentences
      sentences = [x for x in sentences if x.strip()]
      # restore first min_start if set
      if sentences and min_start > 0:
          sentences[0] = response[:min_start] + sentences[0]
      elif min_start > 0:
          sentences.append(response[:min_start])
  
      return sentences
  
file_path: h2ogpt/src/tts_sentence_parsing.py
imports: import textwrap
  import re
  from src.utils import flatten_list, have_emoji, have_langid
label_desc: Use image node_id 6 for calling a global function with example usage: _get_sentences(response, verbose, min_start, max_length) and returns: sentences