code: def _replace_spaces(self, name: str) -> str:
          
          if self.replace_spaces:
              return name.strip().replace(' ', str(self.replace_spaces_with))
          return name
docs: Replace the spaces in the given name based on the config
          :param name: name to replace spaces in
          :return: name with spaces replaced with the configured character(s) or unchanged if configured