code: def calculate_sample_cdf(alphabet_size, rng, precision=16):
      # Samples frequency counts from a uniform distribution
      # and returns the discretized CDF
      freqs = rng.uniform(size=alphabet_size)
      return freqs_to_cdf(freqs, precision)
  
file_path: NeuralCompression/projects/jax_entropy_coders/test_entropy_coders.py
imports: import craystack
  import jax.numpy
  import jax_arithmetic_coder
  import numpy
  import pytest
  import scipy
label_desc: Use image node_id 3 for calling a global function with example usage: calculate_sample_cdf(alphabet_size, rng, precision) and returns: freqs_to_cdf