<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def assign(self, dst, req, src):
 """Helper function for assigning into dst depending on requirements."""

        if req == 'null':
            return
        elif req in ('write', 'inplace'):
            dst[:] = src
        elif req == 'add':
            dst[:] += src