class_docstr: The scansion symbols used can be configured by passing a suitable constants class to
  the constructor.
docstr: Calculate a dictionary of accent positions from a list of syllables with spaces.
  
  :param syllables_spaces:
  :return:
docstr_tok: ["Calculate","a","dictionary","of","accent","positions","from","a","list","of","syllables","with","spaces",".",":","param","syllables_spaces",":",":","return",":"]
code: def calc_offset(self, syllables_spaces: List[str]) -> Dict[int, int]:
      """
      Calculate a dictionary of accent positions from a list of syllables with spaces.
  
      :param syllables_spaces:
      :return:
      """
      line = string_utils.flatten(syllables_spaces)
      mydict = {}  # type: Dict[int, int]
      # #defaultdict(int) #type: Dict[int, int]
      for idx, syl in enumerate(syllables_spaces):
          target_syllable = syllables_spaces[idx]
          skip_qu = string_utils.starts_with_qu(target_syllable)
          matches = list(
              self.syllable_matcher.finditer(target_syllable)
          )
          for position, possible in enumerate(matches):
              if skip_qu:
                  skip_qu = False
                  continue
              (start, end) = possible.span()
              if (
                  target_syllable[start:end]
                  in self.constants.VOWELS
                  + self.constants.ACCENTED_VOWELS
              ):
                  part = line[: len("".join(syllables_spaces[:idx]))]
                  offset = len(part) + start
                  if (
                      line[offset]
                      not in self.constants.VOWELS
                      + self.constants.ACCENTED_VOWELS
                  ):
                      LOG.error(
                          "Problem at line {} offset {}".format(
                              line, offset
                          )
                      )
                  mydict[idx] = offset
      return mydict
  
imports: import logging
  import re
  from typing import Any, Dict, List
  import cltk.prosody.lat.string_utils
  from cltk.prosody.lat.metrical_validator import MetricalValidator
  from cltk.prosody.lat.scansion_constants import ScansionConstants
  from cltk.prosody.lat.scansion_formatter import ScansionFormatter
  from cltk.prosody.lat.syllabifier import Syllabifier
  from cltk.prosody.lat.verse import Verse
label_desc: Use image node_id 6 for calling the VerseScanner obj's underlying member method code with example usage: obj.calc_offset(syllables_spaces) and returns: mydict