<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def handle_real_loop_comparison(self, args, target, upper_bound):
 """ Handle comparison for real loops. Add the correct comparison operator if possible. """

        # order is 1 for increasing loop, -1 for decreasing loop and 0 if it is
        # not known at compile time
        if len(args) <= 2:
            order = 1
        elif isinstance(args[2], ast.Num):
            order = -1 + 2 * (int(args[2].n) > 0)
        elif isinstance(args[1], ast.Num) and isinstance(args[0], ast.Num):
            order = -1 + 2 * (int(args[1].n) > int(args[0].n))
        else:
            order = 0

        comparison = "{} < {}" if order == 1 else "{} > {}"
        comparison = comparison.format(target, upper_bound)
        return comparison