<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def magic(self, alias):
 """Returns the appropriate IPython code magic when called with an alias for a language. """

        if alias in self.aliases:
            return self.aliases[alias]
        else:
            return "%%{}\n".format(alias)