code: def _state_reduction_sum(state: torch.Tensor) -> torch.Tensor:
      return state.sum(dim=0)
  
imports: from typing import Any, Dict, List, Optional, Type
  import torch
  from torch import distributed
  from torchrec.metrics.metrics_config import RecComputeMode, RecTaskInfo
  from torchrec.metrics.metrics_namespace import MetricName, MetricNamespace, MetricPrefix
  from torchrec.metrics.rec_metric import MetricComputationReport, RecMetric, RecMetricComputation, RecMetricException
label_desc: Use image node_id 7 for calling a global function with example usage: _state_reduction_sum(state) and returns: state