<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write(self, keyArgs):
 """ Write specified key arguments into data structure. """

        # bytearray doesn't work with fcntl
        args = array.array('B', (0,) * self.size)
        self._struct.pack_into(args, 0, *list(self.yieldArgs(keyArgs)))
        return args