import tensorflow as tf


        with tf.control_dependencies(control_inputs=(assignment,)):
            assignment = tf.assign(ref=self.memory_index, value=((self.memory_index + num_instances) % self.capacity))

