human
I am working on the file "DL0110EN/1.3.1_simple_data_set_v2.ipynb".
The first task is:
Double-click <b>here</b> for the solution.
<!-- 
my_dataset = toy_set(length = 50)
print("My toy_set length: ", len(my_dataset))
-->

<!--Empty Space for separating topics-->

<h2 id="Transforms">Transforms</h2>

You can also create a class for transforming the data. In this case, we will try to add 1 to x and multiply y by 2:
Can you write Python code for it?
assistant
#Here is the Python code you requested.

# Create tranform class add_mult

class add_mult(object):
    
    # Constructor
    def __init__(self, addx = 1, muly = 2):
        self.addx = addx
        self.muly = muly
    
    # Executor
    def __call__(self, sample):
        x = sample[0]
        y = sample[1]
        x = x + self.addx
        y = y * self.muly
        sample = x, y
        return sample