code: def test_normal():
      @make_funsor
      def Normal(
          loc: Funsor,
          scale: Funsor,
          value: Fresh[lambda loc: loc],
      ) -> Fresh[Real]:
          return None
  
      @eager.register(Normal, Tensor, Tensor, Tensor)
      def _(loc, scale, value):
          z = (value - loc) / scale
          log_prob = (-0.5) * z**2 - 0.5 * math.log(2 * math.pi)
          return log_prob.sum()
  
      inputs = OrderedDict(i=Bint[3])
      loc = random_tensor(inputs)
      scale = random_tensor(inputs).exp()
      value = random_tensor(inputs)
      d = Normal(loc, scale, "value")
      assert isinstance(d, Normal)
      check_funsor(d, {"value": Real, "i": Bint[3]}, Real)
  
      actual = d(value=value)
      assert isinstance(actual, Tensor)
      check_funsor(actual, {"i": Bint[3]}, Real)
  
imports: import math
  from collections import OrderedDict
  import pytest
  import funsor.ops
  from funsor.domains import Array, Bint, Real, Reals
  from funsor.factory import Bound, Fresh, Has, Value, make_funsor, to_funsor
  from funsor.interpretations import reflect
  from funsor.interpreter import reinterpret
  from funsor.tensor import Tensor
  from funsor.terms import Cat, Funsor, Lambda, Number, eager
  from funsor.testing import assert_close, check_funsor, random_tensor, requires_backend
label_desc: Use image node_id 7 for calling a global function with example usage: test_normal() and returns: None, log_prob