<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def put_keys(self, press_keys=None, hold_keys=None, press_delay=50):
 """Put scancodes that represent keys defined in the sequences provided. Arguments: press_keys: Press a sequence of keys hold_keys: While pressing the sequence of keys, hold down the keys defined in hold_keys. press_delay: Number of milliseconds to delay between each press Note: Both press_keys and hold_keys are iterable objects that yield self.SCANCODE.keys() keys. """

        if press_keys is None:
            press_keys = []
        if hold_keys is None:
            hold_keys = []

        release_codes = set()
        put_codes = set()
        try:
            # hold the keys
            for k in hold_keys:
                put, release = self.SCANCODES[k]
                # Avoid putting codes over and over
                put = set(put) - put_codes
                self.put_scancodes(list(put))
                put_codes.update(put)
                release_codes.update(release)
            # press the keys
            for k in press_keys:
                put, release = self.SCANCODES[k]
                # Avoid putting held codes
                _put = set(put) - put_codes
                if not _put:
                    continue
                release = set(release) - release_codes
                # Avoid releasing held codes
                if not release:
                    continue
                self.put_scancodes(list(put) + list(release))
                time.sleep(press_delay / 1000.0)
        finally:
            # release the held keys
            for code in release_codes:
                self.put_scancode(code)