code: def test_partitions():
      a = nn.Linear(1, 1)
      b = nn.Linear(1, 1)
  
      model = nn.Sequential(a, b)
      model = Pipe(model, [1, 1], devices=["cpu", "cpu"])
  
      assert isinstance(model.partitions, nn.ModuleList)
      assert isinstance(model.partitions[0], nn.Sequential)
      assert isinstance(model.partitions[1], nn.Sequential)
  
      assert "partitions.0.0.weight" in model.state_dict()
  
imports: from collections import OrderedDict
  from copy import deepcopy
  import time
  import pytest
  import torch
  from torch import nn
  from fairscale.nn.pipe import Pipe
label_desc: Use image node_id 26 for calling a global function with example usage: test_partitions() without return types