code: def q_explained_variance(qpred, q):
      _, vary = tf.nn.moments(q, axes=[0, 1])
      _, varpred = tf.nn.moments(q - qpred, axes=[0, 1])
      check_shape([vary, varpred], [[]] * 2)
      return 1.0 - (varpred / vary)
  
imports: import os
  import numpy
  import tensorflow
  from collections import deque
label_desc: Use image node_id 25 for calling a global function with example usage: q_explained_variance(qpred, q) and returns: unknown