docstr: Find the nearest father conv layers for the target node.
  
  Parameters
  ---------
  node : torch._C.Node
      target node.
  
  Returns
  -------
  parent_layers : list
      nearest father conv layers for the target node. Due to the group
      dependency only exists between the conv layers, so we only find
      the parent conv layers.
docstr_tok: ["Find","the","nearest","father","conv","layers","for","the","target","node",".","Parameters","--","--","--","--","-","node",":","torch._C.Node","target","node",".","Returns","--","--","--","-","parent_layers",":","list","nearest","father","conv","layers","for","the","target","node",".","Due","to","the","group","dependency","only","exists","between","the","conv","layers",",","so","we","only","find","the","parent","conv","layers","."]
code: def _get_parent_convs(self, node):
      """
      Find the nearest father conv layers for the target node.
  
      Parameters
      ---------
      node : torch._C.Node
          target node.
  
      Returns
      -------
      parent_layers : list
          nearest father conv layers for the target node. Due to the group
          dependency only exists between the conv layers, so we only find
          the parent conv layers.
      """
      parent_layers = []
      # the input node is a Conv node
      predeessors = self.graph.find_predecessors(node.unique_name)
      predeessors = [self.graph.name_to_node[x] for x in predeessors]
      queue = predeessors
      while queue:
          curnode = queue.pop(0)
          if (
              curnode.op_type == "Conv2d"
              or curnode.op_type == "ConvTranspose2d"
          ):
              # find the first met conv
              parent_layers.append(curnode.name)
              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
label_desc: Use image node_id 2 for calling the GroupDependency obj's underlying member method code with example usage: obj._get_parent_convs(node) and returns: parent_layers