<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def do_postfix(self, arg):
 """Sets the function to apply to the values of a specific variable before plotting or tabulating values. """

        usable, filename, append = self._redirect_split(arg)
        sargs = usable.split()
        if len(sargs) == 1 and sargs[0] == "list":
            self._print_map_dict("functions", filename, append)
        elif len(sargs) >= 2:
            defvars = self._postfix_varlist("postfix " + arg)
            for var in defvars.values():
                if not self._validate_var(var):
                    msg.err("Variable '{}' is not a valid variable|property combination.")
                    return

            fxn = arg.split()[-1]
            if ":" not in fxn:
                msg.err("{} is not a valid postfix function expression.")
                self.help_postfix()
                return

            modvar = fxn.split(":")[0]
            if modvar not in defvars:
                msg.err("Invalid postfix function: variable '{}' not defined.".format(modvar))
                return
            
            defvars["lambda"] = fxn
            self.curargs["functions"][defvars[modvar]] = defvars
            #Give the user some feedback so that they know it was successful.
            self.do_postfix("list")