<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def patch(self, patch):
 """Patch record metadata. :params patch: Dictionary of record metadata. :returns: A new :class:`Record` instance. """

        data = apply_patch(dict(self), patch)
        return self.__class__(data, model=self.model)