code: def kstest(l1, l2):
      n1, n2 = len(l1), len(l2)
      l1.sort()
      l2.sort()
      j1, j2, d, fn1, fn2 = 0, 0, 0.0, 0.0, 0.0
      while j1 < n1 and j2 < n2:
          d1, d2 = l1[j1], l2[j2]
          if d1 <= d2:
              fn1 = (float(j1) + 1.0) / float(n1)
              j1 += 1
          if d2 <= d1:
              fn2 = (float(j2) + 1.0) / float(n2)
              j2 += 1
          dtemp = math.fabs(fn2 - fn1)
          if dtemp > d:
              d = dtemp
      ne = float(n1 * n2) / float(n1 + n2)
      nesq = math.sqrt(ne)
      prob = ksprob((nesq + 0.12 + 0.11 / nesq) * d)
      return prob
  
imports: import math
  import unittest
  import numpy
  import torch
  from tinygrad import nn, dtypes, Tensor
  from functools import partial
label_desc: Use image node_id 2 for calling a global function with example usage: kstest(l1, l2) and returns: prob