<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_scancodes(self, scancodes):
 """Sends an array of scancodes to the keyboard. in scancodes of type int return codes_stored of type int raises :class:`VBoxErrorIprtError` Could not send all scan codes to virtual keyboard. """

        if not isinstance(scancodes, list):
            raise TypeError("scancodes can only be an instance of type list")
        for a in scancodes[:10]:
            if not isinstance(a, baseinteger):
                raise TypeError(
                        "array can only contain objects of type baseinteger")
        codes_stored = self._call("putScancodes",
                     in_p=[scancodes])
        return codes_stored