code: def lookup_attribute_chain(attrname, namespace):
      
      #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
docs: >>> attrname = funcname
          >>> namespace = mod.__dict__
  
  
          >>> import utool as ut
          >>> globals_ = ut.util_inspect.__dict__
          >>> attrname = 'KWReg.print_defaultkw'