<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def keyframe(self, keyframe):
 """Set keyframe."""

        if self._keyframe == keyframe:
            return
        if self._keyframe is not None:
            raise RuntimeError('cannot reset keyframe')
        if len(self._offsetscounts[0]) != len(keyframe.dataoffsets):
            raise RuntimeError('incompatible keyframe')
        if keyframe.is_tiled:
            pass
        if keyframe.is_contiguous:
            self._offsetscounts = ([self._offsetscounts[0][0]],
                                   [keyframe.is_contiguous[1]])
        else:
            self._offsetscounts = clean_offsetscounts(*self._offsetscounts)
        self._keyframe = keyframe