code: def test_sanity_check():
      x = Value(-4.0)
      z = 2 * x + 2 + x
      q = z.relu() + z * x
      h = (z * z).relu()
      y = h + q + q * x
      y.backward()
      xmg, ymg = x, y
  
      x = torch.Tensor([-4.0]).double()
      x.requires_grad = True
      z = 2 * x + 2 + x
      q = z.relu() + z * x
      h = (z * z).relu()
      y = h + q + q * x
      y.backward()
      xpt, ypt = x, y
  
      # forward pass went well
      assert ymg.data == ypt.data.item()
      # backward pass went well
      assert xmg.grad == xpt.grad.item()
  
imports: import torch
  from micrograd.engine import Value
label_desc: Use image node_id 1 for calling a global function with example usage: test_sanity_check() without return types