def get_character_node(graph, character, only_one=False):
    """Return nodes for the given character

    :param graph: The graph
    :type graph: nx.Graph
    :param character: The character
    :type character: str
    :param only_one: boolean in order to return one node or all found nodes,
    defaults to False
    :type only_one: bool, optional
    :return: List of nodes if only_one is set to False, else tuple
    :rtype: list or tuple
    """
    found = []
    for node, data in graph.nodes(data=True):
        if data["character"] != character:
            continue
        found.append(node)
    if only_one:
        return found[0] if found else found
    return found