def bfs_depth(self, U):
bfs_queue = [[U, <NUM_LIT:0>]]  <EOL>visited = set()<EOL>max_depth = <NUM_LIT:0><EOL>while bfs_queue:<EOL><INDENT>[V, depth] = bfs_queue.pop()<EOL>if max_depth < depth:<EOL><INDENT>max_depth = depth<EOL><DEDENT>visited.add(V)<EOL>adj_set = self.edges[V]<EOL>for W in adj_set:<EOL><INDENT>if W not in visited:<EOL><INDENT>bfs_queue.append([W, depth + <NUM_LIT:1>])<EOL><DEDENT><DEDENT><DEDENT>return max_depth<EOL>
Returns the maximum distance between any vertex and U in the connected
component containing U
:param U:
:return: