code: def test_consistency(device, levy_area_approximation):
      if device == gpu and not torch.cuda.is_available():
          pytest.skip(msg="CUDA not available.")
  
      t0, t1 = 0.0, 1.0
      for _ in range(REPS):
          bm = torchsde.BrownianInterval(
              t0=t0,
              t1=t1,
              size=(LARGE_BATCH_SIZE,),
              device=device,
              levy_area_approximation=levy_area_approximation,
          )
  
          for _ in range(MEDIUM_REPS):
              ta, t_, tb = sorted(
                  npr.uniform(low=t0, high=t1, size=(3,))
              )
  
              if levy_area_approximation == "none":
                  W = bm(ta, tb)
                  W1 = bm(ta, t_)
                  W2 = bm(t_, tb)
              else:
                  W, U = bm(ta, tb, return_U=True)
                  W1, U1 = bm(ta, t_, return_U=True)
                  W2, U2 = bm(t_, tb, return_U=True)
  
              torch.testing.assert_allclose(
                  W1 + W2, W, rtol=1e-6, atol=1e-6
              )
              if levy_area_approximation != "none":
                  torch.testing.assert_allclose(
                      U1 + U2 + (tb - t_) * W1, U, rtol=1e-6, atol=1e-6
                  )
  
file_path: torchsde/tests/test_brownian_interval.py
imports: import sys
  import math
  import numpy.random
  import torch
  from scipy.stats import kstest
  import pytest
  import torchsde
label_desc: Use image node_id 9 for calling a global function with example usage: test_consistency(device, levy_area_approximation) without return types