docstr: For every matmul operation, find the immediate parent and children Linear operations.
  If we get three parents and one children, add these four weights as a dependecy group.
docstr_tok: ["For","every","matmul","operation",",","find","the","immediate","parent","and","children","Linear","operations",".","If","we","get","three","parents","and","one","children",",","add","these","four","weights","as","a","dependecy","group","."]
code: def build_dependency(self):
      """
      For every matmul operation, find the immediate parent and children Linear operations.
      If we get three parents and one children, add these four weights as a dependecy group.
      """
      self.graph.unpack_manually()
      for node in self.graph.nodes_py.nodes_op:
          layers = []
          if node.op_type == "aten::matmul":
              parent_layers = self._get_parent_layers(node)
              children_layers = self._get_children_layers(node)
              if len(parent_layers) == 3 and len(children_layers) == 1:
                  layers.extend(parent_layers)
                  layers.extend(children_layers)
  
          self.dependency[node.name] = layers
  
imports: import csv
  import logging
  import torch
  import numpy
  from .attr import get_nested_attr
label_desc: Use image node_id 4 for calling the AttentionWeightDependency obj's underlying member method code with example usage: obj.build_dependency() without return types