<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def sametype(func):
 """Method decorator to return ``NotImplemented`` if the args of the wrapped method are of different types. When wrapping a rich model comparison method this will delegate (reflect) the comparison to the right-hand-side object, or fallback by passing it up the inheritance tree. """

    @functools.wraps(func)
    def wrapper(self, other):  # pylint: disable=missing-docstring
        if type(other) is not type(self):
            return NotImplemented
        return func(self, other)
    return wrapper