def _get_test_mlmodel_conv_concat():
        """A mlmodel has a concat with 2 inputs and 1 output all surrounded by conv."""

        # Prepare torch model.
        class Net(torch.nn.Module):
            def __init__(self):
                super(Net, self).__init__()
                self.conv1 = torch.nn.Conv2d(in_channels=10, out_channels=20, kernel_size=4)
                self.conv2 = torch.nn.Conv2d(in_channels=10, out_channels=20, kernel_size=4)
                self.conv3 = torch.nn.Conv2d(in_channels=20, out_channels=20, kernel_size=1)

            def forward(self, img):  # convert + flatten
                y1 = self.conv1(img)
                y2 = self.conv2(img)
                y = torch.concat((y1, y2), 0)
                y3 = self.conv3(y)
                return y3

        model = Net()
        inputs = [ct.TensorType(name="data_0", shape=(5, 10, 4, 4))]
        input_data = [torch.rand(*i.shape.to_list()) for i in inputs]
        torchmodel = torch.jit.trace(model, input_data)

        # Convert to mlmodel.
        mlmodel = ct.convert(
            torchmodel,
            inputs=inputs,
            convert_to="mlprogram",
            compute_units=ct.ComputeUnit.CPU_ONLY,
            compute_precision=ct.precision.FLOAT16,
        )

        return mlmodel
A mlmodel has a concat with 2 inputs and 1 output all surrounded by conv.
coremltools/test/optimize/coreml/test_passes.py