class_docstr: Test cases for random-number generating operators.
docstr: Returns Chi2 GOF statistic.
docstr_tok: ["Returns","Chi2","GOF","statistic","."]
code: def _chi2(self, expected, actual):
      """Returns Chi2 GOF statistic."""
      actual = np.asarray(actual)
      expected = np.asarray(expected)
      diff = actual - expected
      chi2 = np.sum(diff * diff / expected)
      return chi2
  
imports: import collections
  import numpy
  from tensorflow.compiler.tests import xla_test
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import random_seed
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.ops import stateless_random_ops
  from tensorflow.python.platform import googletest
  from tensorflow.python.platform import test
label_desc: Use image node_id 2 for calling the CategoricalTest obj's underlying member method code with example usage: obj._chi2(expected, actual) and returns: chi2