code: def run_compute(self):
      self.is_running = True
      sample_cnt = 0
      while self.is_running:
          # Compute pi
          xs = np.random.uniform(
              low=-1.0, high=1.0, size=self.sample_batch
          )
          ys = np.random.uniform(
              low=-1.0, high=1.0, size=self.sample_batch
          )
          xys = np.stack((xs, ys), axis=-1)
          inside = xs * xs + ys * ys <= 1.0
          xys_inside = xys[inside]
          in_circle = xys_inside.shape[0]
          approx_pi = 4.0 * in_circle / self.sample_batch
  
          # Put the result to the queue.
          sample_cnt += self.sample_batch
          with self.lock:
              self.result_queue.put(
                  PiResult(samples=sample_cnt, pi=approx_pi)
              )
  
imports: import argparse
  import json
  import logging
  import numpy
  import os
  import threading
  import time
  from ray._private.test_utils import monitor_memory_usage
  from ray.data._internal.progress_bar import ProgressBar
  from collections import namedtuple
  from queue import Queue
  import ray
label_desc: Use image node_id 3 for calling the PiCalculator obj's underlying member method code with example usage: obj.run_compute() without return types