How could I construct parallel structure dynamically

I need a block or class that consists of multi parallel fc layers or conv layers. Given an input tensor, these parallel layers are to compute with the identical input tensor, and multi-parallel output tensors are expected to be the output. Since the number of parallel layers is large and varies each time I train a model with it, I hope I could pass an argument to assign the number of inner parallel layers. Hope I have made myself clear. How could I construct such a layer ?