code: def test_output_is_tensor():
      m = RunningAverage(output_transform=lambda x: x)
      m.update(torch.rand(10, requires_grad=True).mean())
      v = m.compute()
      assert isinstance(v, torch.Tensor)
      assert not v.requires_grad
  
      m.update(torch.rand(10, requires_grad=True).mean())
      v = m.compute()
      assert isinstance(v, torch.Tensor)
      assert not v.requires_grad
  
      m.update(torch.rand(10, requires_grad=True).mean())
      v = m.compute()
      assert isinstance(v, torch.Tensor)
      assert not v.requires_grad
  
imports: import warnings
  from functools import partial
  from itertools import accumulate
  import numpy
  import pytest
  import torch
  import ignite.distributed
  from ignite.engine import Engine, Events
  from ignite.metrics import Accuracy, RunningAverage
  from ignite.metrics.metric import RunningBatchWise, RunningEpochWise, SingleEpochRunningBatchWise
label_desc: Use image node_id 7 for calling a global function with example usage: test_output_is_tensor() without return types