'Helper function for assigning into dst depending on requirements.'

def assign(self, dst, req, src):

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