def parse_matrix(matrix):
    """
    Takes an adjacency matrix representing a graph and 
    returns a matrix where all edges from a node to itself are 0.
    """
    new_matrix = matrix.copy()

    for i in range(len(matrix)):
        new_matrix[i][i] = 0
    
    return new_matrix