def parse_dotted_path(path):
    """
    Extracts attribute name from dotted path.
    """
    try:
        objects, attr = path.rsplit('.', 1)
    except ValueError:
        objects = None
        attr = path

    return objects, attr