class_docstr: The scansion symbols used can be configured by passing a suitable constants class to
  the constructor.
docstr: In hexameters, a single foot that is a  unstressed_stressed syllable pattern is often
  just a double spondee, so here we coerce it to stressed.
  
  :param feet: list of string representations of meterical feet
  :param foot: the bad foot to correct
  :param idx: the index of the foot to correct
  :return: corrected scansion
  
  >>> print(HexameterScanner().invalid_foot_to_spondee(
  ... ['-UU', '--', '-U', 'U-', '--', '-UU'],'-U', 2))  # doctest: +NORMALIZE_WHITESPACE
  -UU----U----UU
docstr_tok: ["In","hexameters",",","a","single","foot","that","is","a","unstressed_stressed","syllable","pattern","is","often","just","a","double","spondee",",","so","here","we","coerce","it","to","stressed",".",":","param","feet",":","list","of","string","representations","of","meterical","feet",":","param","foot",":","the","bad","foot","to","correct",":","param","idx",":","the","index","of","the","foot","to","correct",":","return",":","corrected","scansion",">",">",">","print","(","HexameterScanner","(",")",".invalid_foot_to_spondee","(","...","[","'-UU","'",",","'","--","'",",","'-U","'",",","'","U-","'",",","'","--","'",",","'-UU","'","]",",","'-U","'",",","2",")",")","#","doctest",":","+NORMALIZE_WHITESPACE","-UU","--","--","U","--","--","UU"]
code: def invalid_foot_to_spondee(
      self, feet: list, foot: str, idx: int
  ) -> str:
      """
      In hexameters, a single foot that is a  unstressed_stressed syllable pattern is often
      just a double spondee, so here we coerce it to stressed.
  
      :param feet: list of string representations of meterical feet
      :param foot: the bad foot to correct
      :param idx: the index of the foot to correct
      :return: corrected scansion
  
      >>> print(HexameterScanner().invalid_foot_to_spondee(
      ... ['-UU', '--', '-U', 'U-', '--', '-UU'],'-U', 2))  # doctest: +NORMALIZE_WHITESPACE
      -UU----U----UU
      """
      new_foot = foot.replace(
          self.constants.UNSTRESSED, self.constants.STRESSED
      )
      feet[idx] = new_foot
      return "".join(feet)
  
file_path: cltk/src/cltk/prosody/lat/hexameter_scanner.py
imports: import re
  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
  from cltk.prosody.lat.verse_scanner import VerseScanner
label_desc: Use image node_id 4 for calling the HexameterScanner obj's underlying member method code with example usage: obj.invalid_foot_to_spondee(feet, foot, idx) and returns: str