code: def mpi_op(x, op):
      x, scalar = ([x], True) if np.isscalar(x) else (x, False)
      x = np.asarray(x, dtype=np.float32)
      buff = np.zeros_like(x, dtype=np.float32)
      allreduce(x, buff, op=op)
      return buff[0] if scalar else buff
  
file_path: spinningup/spinup/utils/mpi_tools.py
imports: from mpi4py import MPI
  import os, subprocess, sys
  import numpy
label_desc: Use image node_id 7 for calling a global function with example usage: mpi_op(x, op) and returns: unknown