code: def test_custom_cumsum():
      """Test custom cumsum implementation."""
      torch.use_deterministic_algorithms(True)
      x = torch.arange(100).float().cuda()
      if sys.platform != "win32":
          with pytest.warns(
              TorchMetricsUserWarning,
              match="You are trying to use a metric in deterministic mode on GPU that.*",
          ):
              res = _cumsum(x, dim=0).cpu()
      else:
          res = _cumsum(x, dim=0).cpu()
      res2 = np.cumsum(x.cpu(), axis=0)
      assert torch.allclose(res, res2)
  
imports: import sys
  import numpy
  import pytest
  import torch
  from torch import tensor
  from torchmetrics.regression import MeanSquaredError, PearsonCorrCoef
  from torchmetrics.utilities import check_forward_full_state_property, rank_zero_debug, rank_zero_info, rank_zero_warn
  from torchmetrics.utilities.checks import _allclose_recursive
  from torchmetrics.utilities.data import _bincount, _cumsum, _flatten, _flatten_dict, select_topk, to_categorical, to_onehot
  from torchmetrics.utilities.distributed import class_reduce, reduce
  from torchmetrics.utilities.exceptions import TorchMetricsUserWarning
  from torchmetrics.utilities.imports import _TORCH_GREATER_EQUAL_1_13
label_desc: Use image node_id 12 for calling a global function with example usage: test_custom_cumsum() without return types