<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_var_name(self, register_name, mode):
 """Get variable name for a register considering pre and post mode. """

        var_name = {
            "pre": self._translator.get_name_init(register_name),
            "post": self._translator.get_name_curr(register_name),
        }

        return var_name[mode]