<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _str_targets(self):
 """Returns printable string of targets."""

        def _slice_to_str(obj):
            if isinstance(obj, slice):
                start = "" if obj.start is None else str(obj.start.__index__())
                stop = "" if obj.stop is None else str(obj.stop.__index__())
                if obj.step is None:
                    return f"{start}:{stop}"
                else:
                    step = str(obj.step.__index__())
                    return f"{start}:{stop}:{step}"
            else:
                return obj.__index__()

        if isinstance(self.targets, tuple):
            return f"[{', '.join(_slice_to_str(idx for idx in self.targets))}]"
        else:
            return f"[{_slice_to_str(self.targets)}]"