
Python
3) In a directed graph, the edges have a direction. For example, here is a directed graph on 5 vertices. The matrix representation of the directed graph above is shown below. 1 \( [[0,1,0,0,1] \), \( [0,0,0,0,0] \), \( [1,1,0,1,0] \), \( [0,0,0,0,1] \), \( [1,0,0,0,0]] \) The transpose of a directed graph has the direction of its edges reversed. For example, here is the transpose of the graph above, along with its matrix representation. \( [[0,0,1,0,1] \), \( [1,0,1,0,0] \), \( [0,0,0,0,0] \), \( [0,0,1,0,0] \), \( [1,0,0,1,0]] \) Write a function called transpose_m(mat) that takes an n by n matrix representation of a directed graph as an argument and returns a new matrix representing the transpose of the argument.