code: def run_pipelinable(rank, world_size, port):
      pipelinable = PipelinableContext()
      with pipelinable:
          model = MLP()
  
      assert pipelinable.policy == "balanced"
      pipelinable.policy = "uniform"
      assert pipelinable.policy == "uniform"
      pipelinable.to_layer_list()
  
      assert pipelinable.layers_count == len(list(model.children()))
  
      pipeline_model_part_0 = pipelinable.partition(
          NUM_CHUNKS, PIPELINE_SIZE, 0
      )
      assert isinstance(pipeline_model_part_0, torch.nn.Module)
      pipeline_model_part_1 = pipelinable.partition(
          NUM_CHUNKS, PIPELINE_SIZE, 1
      )
      assert isinstance(pipeline_model_part_1, torch.nn.Module)
  
      layers_count_in_part_0 = len(
          list(pipeline_model_part_0._module_list)
      )
      layers_count_in_part_1 = len(
          list(pipeline_model_part_1._module_list)
      )
  
      assert (
          layers_count_in_part_0 + layers_count_in_part_1
          == pipelinable.layers_count
      )
  
file_path: colossalai/tests/test_legacy/test_pipeline/test_pipelinable.py
imports: import pytest
  import torch
  from colossalai.legacy.pipeline.pipelinable import PipelinableContext
  from colossalai.testing import rerun_if_address_is_in_use, spawn
label_desc: Use image node_id 1 for calling a global function with example usage: run_pipelinable(rank, world_size, port) without return types