code: def test_linear():
      input = ShapeTensor(torch.randn(4, 2), True)
      assert shape_inference(
          nn.Linear(2, 3), input
      ).real_shape == MutableShape(4, 3)
      assert shape_inference(nn.Linear(2, 3), input).shape == (4, 3)
      assert shape_inference(
          MutableLinear(2, nni.choice("c", [2, 3])), input
      ).real_shape == MutableShape(4, nni.choice("c", [2, 3]))
  
      assert shape_inference(
          nn.Sequential(
              MutableLinear(2, nni.choice("x", [3, 4])),
              MutableLinear(nni.choice("x", [3, 4]), 5),
          ),
          input,
      ).real_shape == MutableShape(4, 5)
  
imports: import torch
  import torch.nn.functional
  from torch import nn
  import pytest
  import nni
  import nni.nas.profiler.pytorch.utils.shape
  from nni.mutable import MutableList, Categorical
  from nni.nas.nn.pytorch import MutableLinear, MutableConv2d, MutableDropout, MutableMultiheadAttention, ModelSpace, LayerChoice, InputChoice, Repeat
  from nni.nas.profiler.pytorch.utils import shape_inference, submodule_input_output_shapes, ShapeTensor, MutableShape, profiler_leaf_module
label_desc: Use image node_id 18 for calling a global function with example usage: test_linear() without return types