code: def test_reduce_density(log_density):
      point = Tensor(randn(3))
      d = Delta("foo", point, log_density)
      # Note that log_density affects ground substitution but does not affect reduction.
      assert d.reduce(ops.logaddexp, frozenset(["foo"])) is Number(0)
  
file_path: funsor/test/test_delta.py
imports: import pytest
  import funsor.ops
  from funsor.delta import Delta
  from funsor.domains import Real, Reals
  from funsor.tensor import Tensor, numeric_array
  from funsor.terms import Number, Variable
  from funsor.testing import assert_close, check_funsor, randn
label_desc: Use image node_id 5 for calling a global function with example usage: test_reduce_density(log_density) without return types