def edges_to_graph(input_edges):
    """Converts a list of edges into a graph.
    Vertices without an edge are not considered.
    
    Parameters
    ----------
    input_edges : list of tuples (a, b)
        List of edges.
        
    Returns
    -------
    dict
        A graph as dict, each node is once key with a set of adjacent knots as value.
    """

    graph = dict()
    for a, b in input_edges:
        if a in graph:
            graph[a].add(b)
        else:
            s = set()
            s.add(b)
            graph[a] = s
        if b in graph:
            graph[b].add(a)
        else:
            s = set()
            s.add(a)
            graph[b] = s

    return graph