<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def getOutputName(self,name):
 """ Return the name of the file or PyFITS object associated with that name, depending on the setting of self.inmemory. """

        val = self.outputNames[name]
        if self.inmemory: # if inmemory was turned on...
            # return virtualOutput object saved with that name
            val = self.virtualOutputs[val]
        return val