code: def run(gpu_id, tol, max_iter):
      """CuPy Conjugate gradient example
  
      Solve simultaneous linear equations, Ax = b.
      'A' and 'x' are created randomly and 'b' is computed by 'Ax' at first.
      Then, 'x' is computed from 'A' and 'b' in two ways, namely with CPU and
      GPU. To evaluate the accuracy of computation, the Euclidean distances
      between the answer 'x' and the reconstructed 'x' are computed.
  
      """
      for repeat in range(3):
          print("Trial: %d" % repeat)
          # Create the large symmetric matrix 'A'.
          N = 2000
          A = np.random.randint(-50, 50, size=(N, N))
          A = (A @ A.T).astype(np.float64)
          x_ans = np.random.randint(-50, 50, size=N).astype(np.float64)
          b = np.dot(A, x_ans)
  
          print("Running CPU...")
          with timer(" CPU "):
              x_cpu = fit(A, b, tol, max_iter)
          print(np.linalg.norm(x_cpu - x_ans))
  
          with cupy.cuda.Device(gpu_id):
              A_gpu = cupy.asarray(A)
              b_gpu = cupy.asarray(b)
              print("Running GPU...")
              with timer(" GPU "):
                  x_gpu = fit(A_gpu, b_gpu, tol, max_iter)
              print(np.linalg.norm(cupy.asnumpy(x_gpu) - x_ans))
  
          print()
  
imports: import argparse
  import contextlib
  import time
  import numpy
  import cupy
label_desc: Use image node_id 3 for calling a global function with example usage: run(gpu_id, tol, max_iter) without return types