Using attrs , implement a make validated point function in task module.py that creates a 2D Point class…
Using attrs , implement a make validated point function in task module.py that creates a 2D Point class…: a task in repo2rlenv-code-instruct (Harbor dataset). Additionally, implement a clamp point function that takes an instance of such a Point class and a (min val, max val) pair, and returns a…
The task
Additionally, implement a `clamp_point` function that takes an instance of such a `Point` class and a `(min_val, max_val)` pair, and returns a new instance with `x` and `y` clamped to the given range (using `attrs.evolve`).
Part of FineEnvs/repo2rlenv-code-instruct.