code: def repeat_negativebinomial_rdp(orders, rdp, gamma, eta):
      n = len(orders)
      assert len(rdp) == n
      assert min(orders) >= 1
      assert 0 < gamma < 1
      assert eta > 0
      rdp_out = [None] * n
      # foo = log(eta/(1-gamma^eta))
      foo = math.log(eta) - math.log1p(-math.pow(gamma, eta))
      for i in range(n):
          if orders[i] == 1:
              continue  # forumla doesn't work for lambda=1
          for j in range(n):
              eps = (
                  rdp[i]
                  + (1 + eta) * (1 - 1 / orders[j]) * rdp[j]
                  - ((1 + eta) / orders[j] + 1 / (orders[i] - 1))
                  * math.log(gamma)
                  + foo / (orders[i] - 1)
                  + (1 + eta) * math.log1p(-gamma) / orders[j]
              )
              if rdp_out[i] is None or eps < rdp_out[i]:
                  rdp_out[i] = eps
      return rdp_out
  
imports: import math
  import matplotlib.pyplot
  import numpy
  import rdp_accountant
label_desc: Use image node_id 3 for calling a global function with example usage: repeat_negativebinomial_rdp(orders, rdp, gamma, eta) and returns: rdp_out