<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def taking(n):
 """Create a transducer which takes the first n items"""


    if n < 0:
        raise ValueError("Cannot take fewer than zero ({}) items".format(n))

    def taking_transducer(reducer):
        return Taking(reducer, n)

    return taking_transducer