def METHOD_NAME(self, klass, node_id):
    klass = NODES_CLASSES[klass.lower().split(".")[0]]
    node = klass.objects.METHOD_NAME(id=node_id)
    result = {"links": list(), "nodes": list()}
    result["nodes"].append(node.to_mongo())
    node_ids = set()
    links = list(set(list(node.incoming()) + list(node.outgoing())))
    for link, node in links:
        if node.id not in node_ids:
            node_ids.add(node)
            result["nodes"].append(node.to_mongo())
        result["links"].append(link.to_dict())
    return render(result)