<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_latex(self):
 """ Returns an interval representation """

        if self.low == self.high:
            if self.low * 10 % 10 == 0:
                return "{0:d}".format(int(self.low))
            else:
                return "{0:0.2f}".format(self.low)
        else:
            t = ""
            if self.low == -np.inf:
                t += r"(-\infty, "
            elif self.low * 10 % 10 == 0:
                t += r"[{0:d}, ".format(int(self.low))
            else:
                t += r"[{0:0.2f}, ".format(self.low)
            if self.high == np.inf:
                t += r"\infty)"
            elif self.high * 10 % 10 == 0:
                t += r"{0:d}]".format(int(self.high))
            else:
                t += r"{0:0.2f}]".format(self.high)
            return t