def METHOD_NAME():
  moving1 = flex.vec3_double()
  moving2 = flex.vec3_double()
  fixed  = flex.vec3_double()
  max_noise = 0
  for ii in range(10):
    noise = flex.random_double(3)*2-1.0
    if noise.norm() > max_noise:
      max_noise = noise.norm()
    xyz = flex.random_double(3)*5
    fixed.append( list(xyz) )
    moving1.append(  list(xyz + noise/10) )
    moving2.append(  list(xyz + noise/2) )
  ne = nsd_engine(fixed)
  a = ne.nsd(fixed)
  b = ne.nsd(moving1)
  c = ne.nsd(moving2)
  assert abs(a)<1e-6
  assert(b<=c)
  matrix = euler.zyz_matrix(0.7,1.3,2.1)
  fixed_r = matrix*moving1+(8,18,28)
  fitter = nsd_rigid_body_fitter( fixed,fixed_r)
  nxyz = fitter.best_shifted()
  dd = nxyz[0:fixed.size()]-fixed
  dd = dd.norms()
  dd = flex.max(dd)
  assert (dd<2.00*max_noise/10)