<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_trapezoidal_integration(self, n):
 """Set the code to use trapezoidal integration. **Call signature** *n* Use this many nodes Returns *self* for convenience in chaining. """

        if not (n >= 2):
            raise ValueError('must have n >= 2; got %r' % (n,))

        self.in_vals[IN_VAL_INTEG_METH] = n + 1
        return self