def resolve(obj, path):
    """
    Resolve a locator `path` starting from object `obj`.
    """
    if path:
        for name in path.split('.'):
            obj = getattr(obj, name, None)
    return obj
