def named_refs(obj, **opts):
    """Returns (a generator for) all named *referents* of an object
    (re-using functionality from **asizeof**).

    See function **basicsize** for a description of the options.

    Does not return un-named *referents*, e.g. objects in a list.
    """
    t = _typedefof(obj, **opts)
    if t:
        r = t.refs
        if r and _iscallable(r):
            for nr in r(obj, True):
                try:
                    yield nr.name, nr.ref
                except AttributeError:
                    pass
Returns (a generator for) all named *referents* of an object
    (re-using functionality from **asizeof**).

    See function **basicsize** for a description of the options.

    Does not return un-named *referents*, e.g. objects in a list.
    
recipes/Python/546530_Size_of_Python_objects_revised/recipe-546530.py