<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def cmd_cuts(self, lo=None, hi=None, ch=None):
 """cuts lo=val hi=val ch=chname If neither `lo` nor `hi` is provided, returns the current cut levels. Otherwise sets the corresponding cut level for the given channel. If `ch` is omitted, assumes the current channel. """

        viewer = self.get_viewer(ch)
        if viewer is None:
            self.log("No current viewer/channel.")
            return

        loval, hival = viewer.get_cut_levels()

        if (lo is None) and (hi is None):
            self.log("lo=%f hi=%f" % (loval, hival))

        else:
            if lo is not None:
                loval = lo
            if hi is not None:
                hival = hi
            viewer.cut_levels(loval, hival)

            self.log("lo=%f hi=%f" % (loval, hival))