code: def sentences_with_char_spans(self, sentences):
      # since SENTENCE_BOUNDARY_REGEX doesnt account
      # for trailing whitespaces \s* & is used as suffix
      # to keep non-destructive text after segments joins
      sent_spans = []
      prior_end_char_idx = 0
      for sent in sentences:
          for match in re.finditer(
              "{0}\s*".format(re.escape(sent)), self.original_text
          ):
              match_str = match.group()
              match_start_idx, match_end_idx = match.span()
              if match_end_idx > prior_end_char_idx:
                  # making sure if curren sentence and its span
                  # is either first sentence along with its char spans
                  # or current sent spans adjacent to prior sentence spans
                  sent_spans.append(
                      TextSpan(
                          match_str, match_start_idx, match_end_idx
                      )
                  )
                  prior_end_char_idx = match_end_idx
                  break
      return sent_spans
  
file_path: pySBD/pysbd/segmenter.py
imports: import re
  from pysbd.languages import Language
  from pysbd.processor import Processor
  from pysbd.cleaner import Cleaner
  from pysbd.utils import TextSpan
label_desc: Use image node_id 4 for calling the Segmenter obj's underlying member method code with example usage: obj.sentences_with_char_spans(sentences) and returns: sent_spans