code: def _substitute(self, str):
          
          if not self.attr.get("substitute",True):return str
          return self._regex.sub(lambda mo:
                  self._reflections[mo.string[mo.start():mo.end()]],
                      str.lower())
docs: Substitute words in the string, according to the specified reflections,
          e.g. "I'm" -> "you are"
  
          :type str: str
          :param str: The string to be mapped
          :rtype: str