class_docstr: This model analyze the group dependencis between the conv
  layers in a model.
  
  Parameters
  ----------
  model : torch.nn.Module
      The model to be analyzed.
  dummy_input : torch.Tensor
      The example input data to trace the network architecture.
  traced_model : torch._C.Graph
      if we alreay has the traced graph of the target model, we donnot
      need to trace the model again.
class_docstr_tok: ["This","model","analyze","the","group","dependencis","between","the","conv","layers","in","a","model",".","Parameters","--","--","--","--","--","model",":","torch.nn.Module","The","model","to","be","analyzed",".","dummy_input",":","torch.Tensor","The","example","input","data","to","trace","the","network","architecture",".","traced_model",":","torch._C.Graph","if","we","alreay","has","the","traced","graph","of","the","target","model",",","we","donnot","need","to","trace","the","model","again","."]
docstr: Get the number of groups for a group norm layer.
  
  Parameters
  ----------
  node_group : NodePyGroup
      target node.
  Returns
  -------
  condition: int
      the number that layer's num channel
      require to be divisible to
docstr_tok: ["Get","the","number","of","groups","for","a","group","norm","layer",".","Parameters","--","--","--","--","--","node_group",":","NodePyGroup","target","node",".","Returns","--","--","--","-","condition",":","int","the","number","that","layer","'s","num","channel","require","to","be","divisible","to"]
code: def _get_group_norm_condition(self, node_group) -> int:
      """
      Get the number of groups for a group norm layer.
  
      Parameters
      ----------
      node_group : NodePyGroup
          target node.
      Returns
      -------
      condition: int
          the number that layer's num channel
          require to be divisible to
      """
      node_name = node_group.name
      leaf_module = get_nested_attr(self.model, node_name)
      assert isinstance(leaf_module, (torch.nn.GroupNorm))
  
      return leaf_module.num_groups
  
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 GroupDependency obj's underlying member method code with example usage: obj._get_group_norm_condition(node_group) and returns: leaf_module