def check_node_on_pos(graph, position, resolution=1e-4):
    """
    Function checks, if at least one node of graph has position 'position'
    Returns boolean value. 'position' attribute must be shapely Point object.

    Parameters
    ----------
    graph : nx.Graph
        networkx graph object (nodes should have attribute 'position')
    position : shapely Point
        shapely Point object, e.g. Point(10.8, 24.5)
    resolution : float, optional
        Minimum distance between two points in m. If  position is closer
        than resolution to another existing node, the existing node will be
        returned.
        (default: 1e-4)

    Returns
    -------
    node_on_pos : bool
        boolean, which defines, if node does exist on position pos
        node_on_pos = True: At least one node exists with position pos
        node_on_pos = False: No node on position pos
    """

    node_on_pos = False  # Initial value

    for n in graph.nodes():
        if 'position' in graph.nodes[n]:
            #  If positions are identical, save name and node_id to dict
            if graph.nodes[n]['position'].distance(position) < resolution:
                node_on_pos = True
                break

    return node_on_pos