<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def __get_constants(self):
 """ Gets the constants from the class that acts like a namespace for constants and adds them to the replace pairs. """

        helper = ConstantClass(self._constants_class_name, self._io)
        helper.reload()
        constants = helper.constants()

        for name, value in constants.items():
            self._add_replace_pair(name, value, True)

        self._io.text('Read {0} constants for substitution from <fso>{1}</fso>'.
                      format(len(constants), helper.file_name()))