<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def var_replace(self, text):
 """Replaces all instances of @VAR with their values in the specified text. """

        result = text
        for var in self._vardict:
            result = result.replace("@{}".format(var), self._vardict[var])
        return result