code: def test_nested_shape():
      shape = wandb.wandb_torch.nested_shape([2, 4, 5])
      assert shape == [[], [], []]
  
      shape = wandb.wandb_torch.nested_shape(
          [
              torch.ones((2, 3), requires_grad=True),
              torch.ones((4, 5), requires_grad=True),
          ]
      )
      assert shape == [[2, 3], [4, 5]]
  
      # create recursive lists of tensors (t3 includes itself)
      t1 = torch.ones((2, 3), requires_grad=True)
      t2 = torch.ones((4, 5), requires_grad=True)
      t3 = [t1, t2]
      t3.append(t3)
      t3.append(t2)
      shape = wandb.wandb_torch.nested_shape([t1, t2, t3])
      assert shape == [[2, 3], [4, 5], [[2, 3], [4, 5], 0, [4, 5]]]
  
file_path: wandb/tests/pytest_tests/unit_tests/test_torch.py
imports: import pytest
  import torch
  import torch.nn
  import wandb
label_desc: Use image node_id 1 for calling a global function with example usage: test_nested_shape() without return types