code: def testZipfDistribution(self):
      # Following Zipf's Law with alpha equals 1: the first in rank is two times
      # more probable/frequent that the second in rank, three times more prob/freq
      # that the third in rank and so on.
      d = algorithmic.zipf_distribution(10, 1.0001)
      for i in range(len(d[1:]) - 1):
          self.assertEqual(
              "%.4f" % (abs(d[i + 1] - d[i + 2]) * (i + 2)),
              "%.4f" % d[1],
          )
  
file_path: tensor2tensor/tensor2tensor/data_generators/algorithmic_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from six.moves import range
  from tensor2tensor.data_generators import algorithmic
  import tensorflow.compat.v1
label_desc: Use image node_id 3 for calling the AlgorithmicTest obj's underlying member method code with example usage: obj.testZipfDistribution() without return types