def METHOD_NAME(self, multiplicand, multiplier):
    if hasattr(multiplier, "data"):
        impl.multiply_out_of_place(self.data, multiplicand.data, multiplier.data)
    else:
        impl.multiply_out_of_place(self.data, multiplicand.data, multiplier)
    return self