<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def realloc(self, ptr, size):
 """ A somewhat faithful implementation of libc `realloc`. :param ptr: the location in memory to be reallocated :param size: the new size desired for the allocation :returns: the address of the allocation, or a NULL pointer if the allocation was freed or if no new allocation was made """

        raise NotImplementedError("%s not implemented for %s" % (self.realloc.__func__.__name__,
                                                                 self.__class__.__name__))