Please solve the programming task below using a self-contained code snippet in a markdown code block.

The diameter of a tree is the number of edges in the longest path in that tree.
There is an undirected tree of n nodes labeled from 0 to n - 1. You are given a 2D array edges where edges.length == n - 1 and edges[i] = [ai, bi] indicates that there is an undirected edge between nodes ai and bi in the tree.
Return the diameter of the tree.
 
Please complete the following python code precisely:
```python
class Solution:
    def treeDiameter(self, edges: List[List[int]]) -> int:
```