def METHOD_NAME(self, conn_type, first_class, middle_class, last_class, num_comp):
    first_name = 'first'
    last_name = 'last'
    var_shape = self.options['var_shape']
    num_var = self.options['num_var']
    comp_args = {
        'var_shape': var_shape,
        'num_var': num_var,
        'jacobian_type': self.options['jacobian_type'],
        'partial_type': self.options['partial_type'],
        'connection_type': conn_type,
        'partial_method': self.options['partial_method'],
        'num_comp': self.options['num_comp']
    }
    self.add_subsystem('psi_comp', om.IndepVarComp('psi', PSI))
    indep_var_comp = self.add_subsystem('x0_comp', om.IndepVarComp())
    for i in range(num_var):
        indep_var_comp.add_output('x_{0}'.format(i), val=np.ones(var_shape))
    idx = 0
    first_comp = first_class(index=idx, **comp_args)
    first_comp._init_parameterized()
    self.add_subsystem(first_name, first_comp,
                       promotes_inputs=first_comp._cycle_promotes_in,
                       promotes_outputs=first_comp._cycle_promotes_out)
    prev_name = first_name
    connection_variables = [('y_{0}'.format(i), 'x_{0}'.format(i)) for i in range(num_var)]
    connection_variables.append(('theta_out', 'theta'))
    # Middle Subsystems
    for idx in range(1, num_comp - 1):
        current_name = 'middle_{0}'.format(idx)
        middle_comp = middle_class(index=idx, **comp_args)
        middle_comp._init_parameterized()
        self.add_subsystem(current_name, middle_comp,
                           promotes_inputs=middle_comp._cycle_promotes_in,
                           promotes_outputs=middle_comp._cycle_promotes_out)
        if conn_type == 'explicit':
            self._explicit_connections(prev_name, current_name, connection_variables)
        prev_name = current_name
    # Final Subsystem
    last_comp = last_class(index=idx+1, **comp_args)
    last_comp._init_parameterized()
    self.add_subsystem(last_name, last_comp,
                       promotes_inputs=last_comp._cycle_promotes_in,
                       promotes_outputs=last_comp._cycle_promotes_out)
    if conn_type == 'explicit':
        self._explicit_connections(prev_name, last_name, connection_variables)
        self._explicit_connections(last_name, first_name, [('theta_out', 'theta')])
    else:
        theta_out = last_comp._cycle_names['theta_out']
        theta_in = first_comp._cycle_names['theta']
        self.connect(theta_out, theta_in)
    self.connect('psi_comp.psi', first_name + '.psi')
    self.connect('psi_comp.psi', last_name + '.psi')
    if conn_type == 'explicit':
        var_name = first_name + '.x_{0}'
    else:
        var_name = 'x_0_{0}'
    for i in range(num_var):
        self.connect('x0_comp.x_{0}'.format(i), var_name.format(i))