code: def test_EKFDistribution_smoke(Model, dim, time):
      x0 = torch.rand(2 * dim)
      ys = torch.randn(time, dim)
      P0 = torch.eye(2 * dim).requires_grad_()
      R = torch.eye(dim).requires_grad_()
      model = Model(2 * dim, 2.0)
      dist = EKFDistribution(x0, P0, model, R, time_steps=time)
      log_prob = dist.log_prob(ys)
      assert log_prob.shape == torch.Size()
      dP0, dR = torch.autograd.grad(log_prob, [P0, R])
      assert dP0.shape == P0.shape
      assert dR.shape == R.shape
  
imports: import pytest
  import torch
  from pyro.contrib.tracking.distributions import EKFDistribution
  from pyro.contrib.tracking.dynamic_models import NcpContinuous, NcvContinuous
label_desc: Use image node_id 1 for calling a global function with example usage: test_EKFDistribution_smoke(Model, dim, time) without return types