code: def mpi_average(value):
      if not isinstance(value, list):
          value = [value]
      if not any(value):
          value = [0.0]
      return mpi_moments(np.array(value))[0]
  
file_path: baselines/baselines/her/her.py
imports: import os
  import click
  import numpy
  import json
  from mpi4py import MPI
  from baselines import logger
  from baselines.common import set_global_seeds, tf_util
  from baselines.common.mpi_moments import mpi_moments
  import baselines.her.experiment.config
  from baselines.her.rollout import RolloutWorker
label_desc: Use image node_id 1 for calling a global function with example usage: mpi_average(value) and returns: mpi_moments