docstr: Find the nearest parent linear layers for the target node.
  
  Parameters
  ---------
  node : torch._C.Node
      target node.
  
  Returns
  -------
  parent_layers: list
      nearest parent linear layers for the target worknode.
docstr_tok: ["Find","the","nearest","parent","linear","layers","for","the","target","node",".","Parameters","--","--","--","--","-","node",":","torch._C.Node","target","node",".","Returns","--","--","--","-","parent_layers",":","list","nearest","parent","linear","layers","for","the","target","worknode","."]
code: def _get_parent_layers(self, node):
      """
      Find the nearest parent linear layers for the target node.
  
      Parameters
      ---------
      node : torch._C.Node
          target node.
  
      Returns
      -------
      parent_layers: list
          nearest parent linear layers for the target worknode.
      """
      parent_layers = []
      queue = []
      queue.append(node)
      while queue:
          curnode = queue.pop(0)
          if curnode.op_type == "Linear":
              if curnode.name not in parent_layers:
                  parent_layers.append(curnode.name)
              continue
          if curnode.op_type == "LayerNorm":
              continue
          parents = self.graph.find_predecessors(curnode.unique_name)
          parents = [self.graph.name_to_node[name] for name in parents]
          for parent in parents:
              queue.append(parent)
      return parent_layers
  
imports: import csv
  import logging
  import torch
  import numpy
  from .attr import get_nested_attr
label_desc: Use image node_id 2 for calling the AttentionWeightDependency obj's underlying member method code with example usage: obj._get_parent_layers(node) and returns: parent_layers