<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def extend(self, data, size):
 """ Append user-supplied data to chunk, return resulting chunk size. If the data would exceeded the available space, the chunk grows in size. """

        return lib.zchunk_extend(self._as_parameter_, data, size)