def get_connection_owner(system, tgt):
    "\n    Return (owner, promoted_src, promoted_tgt) for the given connected target.\n\n    Note : this is not speedy.  It's intended for use only in error messages.\n\n    Parameters\n    ----------\n    system : System\n        Any System.  The search always goes from the model level down.\n    tgt : str\n        Absolute pathname of the target variable.\n\n    Returns\n    -------\n    tuple\n        (wning group, promoted source name, promoted target name).\n    "
    from openmdao.core.group import Group
    model = system._problem_meta['model_ref']()
    src = model._conn_global_abs_in2out[tgt]
    abs2prom = model._var_allprocs_abs2prom
    if ((src in abs2prom['output']) and (tgt in abs2prom['input'][tgt])):
        if (abs2prom['input'][tgt] != abs2prom['output'][src]):
            for g in model.system_iter(include_self=True, recurse=True, typ=Group):
                if g._manual_connections:
                    tprom = g._var_allprocs_abs2prom['input'][tgt]
                    if (tprom in g._manual_connections):
                        return (g.pathname, g._var_allprocs_abs2prom['output'][src], tprom)
    return (None, None, None)
Return (owner, promoted_src, promoted_tgt) for the given connected target.

Note : this is not speedy.  It's intended for use only in error messages.

Parameters
----------
system : System
    Any System.  The search always goes from the model level down.
tgt : str
    Absolute pathname of the target variable.

Returns
-------
tuple
    (wning group, promoted source name, promoted target name).
def get_connection_owner(system, tgt):
    "\n    Return (owner, promoted_src, promoted_tgt) for the given connected target.\n\n    Note : this is not speedy.  It's intended for use only in error messages.\n\n    Parameters\n    ----------\n    system : System\n        Any System.  The search always goes from the model level down.\n    tgt : str\n        Absolute pathname of the target variable.\n\n    Returns\n    -------\n    tuple\n        (wning group, promoted source name, promoted target name).\n    "
    from openmdao.core.group import Group
    model = system._problem_meta['model_ref']()
    src = model._conn_global_abs_in2out[tgt]
    abs2prom = model._var_allprocs_abs2prom
    if ((src in abs2prom['output']) and (tgt in abs2prom['input'][tgt])):
        if (abs2prom['input'][tgt] != abs2prom['output'][src]):
            for g in model.system_iter(include_self=True, recurse=True, typ=Group):
                if g._manual_connections:
                    tprom = g._var_allprocs_abs2prom['input'][tgt]
                    if (tprom in g._manual_connections):
                        return (g.pathname, g._var_allprocs_abs2prom['output'][src], tprom)
    return (None, None, None)