>>> attrname = funcname
        >>> namespace = mod.__dict__


        >>> import utool as ut
        >>> globals_ = ut.util_inspect.__dict__
        >>> attrname = 'KWReg.print_defaultkw'

def lookup_attribute_chain(attrname, namespace):
    """
        >>> attrname = funcname
        >>> namespace = mod.__dict__


        >>> import utool as ut
        >>> globals_ = ut.util_inspect.__dict__
        >>> attrname = 'KWReg.print_defaultkw'
    """
    #subdict = meta_util_six.get_funcglobals(root_func)
    subtup = attrname.split('.')
    subdict = namespace
    for attr in subtup[:-1]:
        subdict = subdict[attr].__dict__
    leaf_name = subtup[-1]
    leaf_attr = subdict[leaf_name]
    return leaf_attr