<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def decorator_handle(tokens):
 """Process decorators."""

    defs = []
    decorates = []
    for i, tok in enumerate(tokens):
        if "simple" in tok and len(tok) == 1:
            decorates.append("@" + tok[0])
        elif "test" in tok and len(tok) == 1:
            varname = decorator_var + "_" + str(i)
            defs.append(varname + " = " + tok[0])
            decorates.append("@" + varname)
        else:
            raise CoconutInternalException("invalid decorator tokens", tok)
    return "\n".join(defs + decorates) + "\n"