code: def compute_value_loss(eltwise_loss, batch_accumulator="mean"):
      """Compute a loss for value prediction problem.
  
      Args:
          eltwise_loss (Variable): Element-wise loss per example per atom
          batch_accumulator (str): 'mean' or 'sum'. 'mean' will use the mean of
              the loss values in a batch. 'sum' will use the sum.
      Returns:
          (Variable) scalar loss
      """
      assert batch_accumulator in ("mean", "sum")
  
      if batch_accumulator == "sum":
          loss = F.sum(eltwise_loss)
      else:
          loss = F.mean(F.sum(eltwise_loss, axis=1))
      return loss
  
file_path: chainerrl/chainerrl/agents/categorical_dqn.py
imports: import chainer
  from chainer import cuda
  import chainer.functions
  import numpy
  from chainerrl.agents import dqn
label_desc: Use image node_id 2 for calling a global function with example usage: compute_value_loss(eltwise_loss, batch_accumulator) and returns: loss