def inplace(method_name):
    """
    Returns a type instance method that will call the given method
    name, used for inplace operators such as __iadd__ and __imul__.
    """
    def method(self, other):
        getattr(self, method_name)(value_left(self, other))
        return self
    return method
Returns a type instance method that will call the given method
    name, used for inplace operators such as __iadd__ and __imul__.