class_docstr: Converts a graph to its corresponding line-graph
  (functional name: :obj:`line_graph`).
  
  .. math::
      L(\mathcal{G}) &= (\mathcal{V}^{\prime}, \mathcal{E}^{\prime})
  
      \mathcal{V}^{\prime} &= \mathcal{E}
  
      \mathcal{E}^{\prime} &= \{ (e_1, e_2) : e_1 \cap e_2 \neq \emptyset \}
  
  Line-graph node indices are equal to indices in the original graph's
  coalesced :obj:`edge_index`.
  For undirected graphs, the maximum line-graph node index is
  :obj:`(data.edge_index.size(1) // 2) - 1`.
  
  New node features are given by old edge attributes.
  For undirected graphs, edge attributes for reciprocal edges
  :obj:`(row, col)` and :obj:`(col, row)` get summed together.
  
  Args:
      force_directed (bool, optional): If set to :obj:`True`, the graph will
          be always treated as a directed graph. (default: :obj:`False`)
code: def __init__(self, force_directed: bool = False) -> None:
      self.force_directed = force_directed
  
file_path: pytorch_geometric/torch_geometric/transforms/line_graph.py
imports: import torch
  from torch import Tensor
  from torch_geometric.data import Data
  from torch_geometric.data.datapipes import functional_transform
  from torch_geometric.transforms import BaseTransform
  from torch_geometric.utils import coalesce, cumsum, remove_self_loops, scatter
label_desc: Use image node_id 1 to create a new LineGraph object from inherited base classes: BaseTransform with example: obj = LineGraph(force_directed)