max_depth function

Maximum depth metric