def __combinePackage(node):
    """Combines a package variable (e.g. foo.bar.baz) into one string."""

    result = [node.value]
    parent = node.parent
    while parent.type == "dot":
        result.append(parent[1].value)
        parent = parent.parent

    return ".".join(result)