def __call__(self, new_value, *args, **kwargs):
self.previous_value = copy.deepcopy(<EOL>self.cache.get(self.value_to_switch))<EOL>self.cache[self.value_to_switch] = get_array_xcorr(new_value)<EOL>return self<EOL>
TODO change docs if this ever becomes general use
       Set a new value for the default xcorr function.

       This function can be called directly to permanently change the
       default normxcorr function or it may be used as a context manager
       to only modify it temporarily.

       :param new_value:
       :return: