code: def test_basic(problem, method, adaptive):
      d = 10
      batch_size = 128
      ts = torch.tensor([0.0, 0.5], device=device)
      dt = 1e-3
      y0 = torch.zeros(batch_size, d).to(device).fill_(0.1)
  
      problem = problem(d).to(device)
  
      num_before = _count_differentiable_params(problem)
  
      problem.zero_grad()
      _, yt = torchsde.sdeint_adjoint(
          problem, y0, ts, method=method, dt=dt, adaptive=adaptive
      )
      loss = yt.sum(dim=1).mean(dim=0)
      loss.backward()
  
      num_after = _count_differentiable_params(problem)
      assert num_before == num_after
  
file_path: torchsde/tests/test_adjoint.py
imports: import sys
  import pytest
  import torch
  import torchsde
  from torchsde.settings import LEVY_AREA_APPROXIMATIONS, METHODS, NOISE_TYPES, SDE_TYPES
  from .None import utils
  from .None import problems
label_desc: Use image node_id 5 for calling a global function with example usage: test_basic(problem, method, adaptive) without return types