class_docstr: Generates tree graphs.
  
  Args:
      depth (int): The depth of the tree.
      branch (int, optional): The branch size of the tree.
          (default: :obj:`2`)
      undirected (bool, optional): If set to :obj:`True`, the tree graph will
          be undirected. (default: :obj:`False`)
class_docstr_tok: ["Generates","tree","graphs",".","Args",":","depth","(","int",")",":","The","depth","of","the","tree",".","branch","(","int",",","optional",")",":","The","branch","size","of","the","tree",".","(","default",":",":","obj",":","`","2","`",")","undirected","(","bool",",","optional",")",":","If","set","to",":","obj",":","`","True","`",",","the","tree","graph","will","be","undirected",".","(","default",":",":","obj",":","`","False","`",")"]
code: def __call__(self) -> Data:
      edge_index, depth = tree(self.depth, self.branch, self.undirected)
      num_nodes = depth.numel()
      return Data(
          edge_index=edge_index, depth=depth, num_nodes=num_nodes
      )
  
file_path: pytorch_geometric/torch_geometric/datasets/graph_generator/tree_graph.py
imports: from typing import List, Optional, Tuple
  import torch
  from torch import Tensor
  from torch_geometric.data import Data
  from torch_geometric.datasets.graph_generator import GraphGenerator
  from torch_geometric.utils import to_undirected
label_desc: Use image node_id 2 for calling the TreeGraph obj's underlying member method code with example usage: obj.__call__() and returns: Data