<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def phot_mag(*args, **kwargs):
 """Wrapper around phot which only returns the computed magnitude directly."""

    try:
        return phot(*args, **kwargs)
    except IndexError:
        raise TaskError("No photometric records returned for {0}".format(kwargs))