code: def test_normality_simple(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):
          base_W = torch.tensor(npr.randn(), device=device).repeat(
              LARGE_BATCH_SIZE
          )
          bm = torchsde.BrownianInterval(
              t0=t0,
              t1=t1,
              W=base_W,
              levy_area_approximation=levy_area_approximation,
          )
  
          t_ = npr.uniform(low=t0, high=t1)
  
          W = bm(t0, t_)
  
          mean_W = base_W * (t_ - t0) / (t1 - t0)
          std_W = math.sqrt((t1 - t_) * (t_ - t0) / (t1 - t0))
          rescaled_W = (W - mean_W) / std_W
  
          _, pval = kstest(rescaled_W.cpu().detach().numpy(), "norm")
          assert pval >= ALPHA
  
          if levy_area_approximation != "none":
              W, U = bm(t0, t_, return_U=True)
              H = _U_to_H(W, U, t_ - t0)
  
              mean_H = 0
              std_H = math.sqrt((t_ - t0) / 12)
              rescaled_H = (H - mean_H) / std_H
  
              _, pval = kstest(
                  rescaled_H.cpu().detach().numpy(), "norm"
              )
              assert pval >= ALPHA
  
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 7 for calling a global function with example usage: test_normality_simple(device, levy_area_approximation) without return types