human
# Converting increment to a method"
Please write code following the instructions in jupyter notebook style.
assistant
#Here is code to # Converting increment to a method and the other steps required.

class MyTime:
    # Previous method definitions here...

    def increment(self, seconds):
        self.seconds += seconds

        while self.seconds >= 60:
            self.seconds -= 60
            self.minutes += 1

        while self.minutes >= 60:
            self.minutes -= 60
            self.hours += 1