tf.compat.v1.get_local_variable

Gets an existing local variable or creates a new one.