code: def test_dirac_delta():
      fn = pytensor.function(
          [],
          dirac_delta(pt.as_tensor(1)),
          mode=get_default_mode().excluding("useless"),
      )
      with pytest.warns(UserWarning, match=".*DiracDelta.*"):
          assert np.array_equal(fn(), 1)
  
imports: import numpy
  import pytensor
  import pytest
  from pytensor import function
  from pytensor import tensor
  from pytensor.compile import get_default_mode
  from pytensor.graph.basic import ancestors, equal_computations
  from pytensor.tensor.random.op import RandomVariable
  import pymc
  from pymc import SymbolicRandomVariable, inputvars
  from pymc.distributions.transforms import Interval
  from pymc.logprob.abstract import MeasurableVariable
  from pymc.logprob.basic import logp
  from pymc.logprob.utils import ParameterValueError, check_potential_measurability, dirac_delta, replace_rvs_by_values
  from pymc.testing import assert_no_rvs
  from tests.logprob.utils import create_pytensor_params, scipy_logprob_tester
label_desc: Use image node_id 2 for calling a global function with example usage: test_dirac_delta() without return types