code: def HMC(sym, data_inputs, X, Y, X_test, Y_test, sample_num,
          initializer=None, noise_precision=1 / 9.0, prior_precision=0.1,
          learning_rate=1E-6, L=10, dev=mx.gpu()):
      
      label_key = list(set(data_inputs.keys()) - set(['data']))[0]
      exe, exe_params, exe_grads, _ = get_executor(sym, dev, data_inputs, initializer)
      exe.arg_dict['data'][:] = X
      exe.arg_dict[label_key][:] = Y
      sample_pool = []
      accept_num = 0
      start = time.time()
      for i in range(sample_num):
          sample_params, is_accept = step_HMC(exe, exe_params, exe_grads, label_key, noise_precision,
                                              prior_precision, L, learning_rate)
          accept_num += is_accept
  
          if (i + 1) % 10 == 0:
              sample_pool.append(sample_params)
              if (i + 1) % 100000 == 0:
                  end = time.time()
                  print("Current Iter Num: %d" % (i + 1), "Time Spent: %f" % (end - start), "MSE:",
                        sample_test_regression(exe, X=X_test, Y=Y_test, sample_pool=sample_pool,
                                               minibatch_size=Y.shape[0],
                                               save_path='regression_HMC.txt'))
                  start = time.time()
          exe.copy_params_from(sample_params)
      print('accept ratio', accept_num / float(sample_num))
      return sample_pool
docs: Generate the implementation of HMC