def main_composite(kind, toolkits=None, name=None):
if '<STR_LIT>' in kind:<EOL><INDENT>ns, name = kind.rsplit('<STR_LIT>', <NUM_LIT:1>)<EOL>ns += '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>raise ValueError('<STR_LIT>' + str(kind))<EOL><DEDENT>topo = streamsx.topology.topology.Topology(name=name, namespace=ns)<EOL>if toolkits:<EOL><INDENT>for tk_path in toolkits:<EOL><INDENT>streamsx.spl.toolkit.add_toolkit(topo, tk_path)<EOL><DEDENT><DEDENT>return topo, Invoke(topo, kind, name=name)<EOL>
Wrap a main composite invocation as a `Topology`.

    Provides a bridge between an SPL application (main composite)
    and a `Topology`. Create a `Topology` that contains just
    the invocation of the main composite defined by `kind`.

    The returned `Topology` may be used like any other topology
    instance including job configuration, tester or even addition
    of SPL operator invocations or functional transformations.

    .. note:: Since a main composite by definition has no input
        or output ports any functionality added to the topology cannot
        interact directly with its invocation.

    Args:
        kind(str): Kind of the main composite operator invocation.
        toolkits(list[str]): Optional list of toolkits the main composite depends on.
        name(str): Invocation name for the main composite.

    Returns:
        tuple: tuple containing:

        - **Topology**: Topology with main composite invocation.
        - **Invoke**: Invocation of the main composite

    .. versionadded: 1.11