def maybedotted(name):
    if not name:
        raise LookupError(
            'Not able to resolve %s' % name)
    if not hasattr(name, '__name__'):
        try:
            mod = importlib.import_module(name)
        except ImportError:
            attr = None
            if '.' in name:
                names = name.split('.')
                attr = names.pop(-1)
                try:
                    mod = maybedotted('.'.join(names))
                except LookupError:
                    attr = None
                else:
                    attr = getattr(mod, attr, None)
            if attr is not None:
                return attr
            raise LookupError(
                'Not able to resolve %s' % name)
        else:
            return mod
    return name
Used to parse the various Values from the ResourceRecords tags on
dataset/ETHPy150Open gawel/irc3/irc3/utils.py/maybedotted--crossover with--dataset/ETHPy150Open gtaylor/python-route53/route53/xml_parsers/list_resource_record_sets_by_zone_id.py/parse_rrset_record_values