code: def _process_stats(self, worker_stats):
      stats = {
          "num_samples": sum(
              stats.pop("num_samples", np.nan) for stats in worker_stats
          )
      }
  
      for stat_key in worker_stats[0]:
          if isinstance(worker_stats[0], numbers.Number):
              stats[stat_key] = np.nanmean(
                  [s.get(stat_key, np.nan) for s in worker_stats]
              )
          else:
              stats[stat_key] = worker_stats[0][stat_key]
      return stats
  
imports: import io
  import types
  import logging
  import numbers
  import torch
  import numpy
  from zoo.orca.data.ray_xshards import RayXShards
  from zoo.orca.learn.pytorch.training_operator import TrainingOperator
  from zoo.orca.learn.pytorch.torch_runner import TorchRunner
  from zoo.orca.learn.utils import maybe_dataframe_to_xshards, dataframe_to_xshards, convert_predict_xshards_to_dataframe, update_predict_xshards, process_xshards_of_pandas_dataframe
  from zoo.ray import RayContext
  import ray
  from ray.exceptions import RayActorError
label_desc: Use image node_id 3 for calling the PyTorchRayEstimator obj's underlying member method code with example usage: obj._process_stats(worker_stats) and returns: stats