code: def reduce_var(tensor, axis=None, keepdims=False):
      """
      get the variance of a Tensor
  
      :param tensor: (TensorFlow Tensor) the input tensor
      :param axis: (int or [int]) the axis to itterate the variance over
      :param keepdims: (bool) keep the other dimensions the same
      :return: (TensorFlow Tensor) the variance of the tensor
      """
      tensor_mean = tf.reduce_mean(tensor, axis=axis, keepdims=True)
      devs_squared = tf.square(tensor - tensor_mean)
      return tf.reduce_mean(devs_squared, axis=axis, keepdims=keepdims)
  
imports: from functools import reduce
  import os
  import time
  from collections import deque
  import pickle
  import warnings
  import gym
  import numpy
  import tensorflow
  import tensorflow.contrib
  from mpi4py import MPI
  from stable_baselines import logger
  from stable_baselines.common import tf_util, OffPolicyRLModel, SetVerbosity, TensorboardWriter
  from stable_baselines.common.vec_env import VecEnv
  from stable_baselines.common.mpi_adam import MpiAdam
  from stable_baselines.common.buffers import ReplayBuffer
  from stable_baselines.common.math_util import unscale_action, scale_action
  from stable_baselines.common.mpi_running_mean_std import RunningMeanStd
  from stable_baselines.ddpg.policies import DDPGPolicy
label_desc: Use image node_id 4 for calling a global function with example usage: reduce_var(tensor, axis, keepdims) and returns: tf