import tensorflow as tf

                    u = tf.string_join(x_t[i:i + self._p], '')
                    vx_keys, r = tf.cond(
                        tf.greater(vx.lookup(u), -1),
                        true_fn=lambda: (vx_keys, tf.add(vx.lookup(u), 1)),
                        false_fn=lambda: (tf.concat([vx_keys, tf.reshape(u, (-1, 1))], axis=0),
                                          tf.constant(1, dtype=tf.int64, name='constant'))
                    )
                    vx.insert(u, r)

                for i in tf.range(start=0, limit=z_t_len - self._p + 1, delta=1, dtype=None, name='range'):
                    u = tf.string_join(z_t[i:i + self._p], '')
                    vz_keys, r = tf.cond(
                        tf.greater(vz.lookup(u), -1),
                        true_fn=lambda: (vz_keys, tf.add(vz.lookup(u), 1)),
                        false_fn=lambda: (
                            tf.concat([vz_keys, tf.reshape(u, (-1, 1))], axis=0), tf.constant(1, dtype=tf.int64))
                    )
                    vz.insert(u, r)

                kk = tf.Variable(0, dtype=tf.int64)
                for i in tf.range(start=0, limit=tf.size(vx_keys), delta=1, dtype=None, name='range'):
                    for j in tf.range(start=0, limit=tf.size(vz_keys), delta=1, dtype=None, name='range'):
                        to_add = tf.cond(
                            tf.greater(vz.lookup(vx_keys[i]), -1),
                            true_fn=lambda: tf.math.multiply(vx.lookup(vx_keys[i]), vz.lookup(vz_keys[j])),
                            false_fn=lambda: tf.constant(0, dtype=tf.int64)
                        )
                        kk = tf.math.add(kk, to_add)
                    kernel[l][m] = kk

