class_docstr: Trace all indice information for every node.
  
  Indice is a logical concept. Equal dims can been treated as one indice.
  eg. dim(x1) = [a, b, c]
      dim(x2) = [d, e, f]
      and we have x3 = x1 * x2.
      then a=d, b=e, c=f, due to the broadcast property,
      dim(x1)=dim(x2)=dim(x3)=[a, b, c]
  This class will record every node's dims' indice, compute and source.
  
  Attributes:
      node_list (List)
      indice_trace_list (List): [{"indice": [...], "compute": [...], "source": [...]}, {...}]
      indice_view_list (Dict): not used for now
      indice_count (int): record indice number
  
  Args:
      node_list (List)
class_docstr_tok: ["Trace","all","indice","information","for","every","node",".","Indice","is","a","logical","concept",".","Equal","dims","can","been","treated","as","one","indice",".","eg",".","dim","(","x1",")","=","[","a",",","b",",","c","]","dim","(","x2",")","=","[","d",",","e",",","f","]","and","we","have","x3","=","x1","*","x2",".","then","a=d",",","b=e",",","c=f",",","due","to","the","broadcast","property",",","dim","(","x1",")","=dim","(","x2",")","=dim","(","x3",")","=","[","a",",","b",",","c","]","This","class","will","record","every","node","'s","dims","'","indice",",","compute","and","source",".","Attributes",":","node_list","(","List",")","indice_trace_list","(","List",")",":","[","{","``","indice","''",":","[","...","]",",","``","compute","''",":","[","...","]",",","``","source","''",":","[","...","]","}",",","{","...","}","]","indice_view_list","(","Dict",")",":","not","used","for","now","indice_count","(","int",")",":","record","indice","number","Args",":","node_list","(","List",")"]
docstr: Assign indice for linear op.
  1. copy trace from input node and change last indice according to weight
  2. mark equal for input node last indice, weight first dim and bias dim.
  3. inherit input's computation, mark computation for last dim.
  
  Args:
      node (node)
      node_idx (int)
docstr_tok: ["Assign","indice","for","linear","op",".","1.","copy","trace","from","input","node","and","change","last","indice","according","to","weight","2.","mark","equal","for","input","node","last","indice",",","weight","first","dim","and","bias","dim",".","3.","inherit","input","'s","computation",",","mark","computation","for","last","dim",".","Args",":","node","(","node",")","node_idx","(","int",")"]
code: def _assign_linear_indice(self, node: Node, node_idx: int) -> None:
      """
      Assign indice for linear op.
      1. copy trace from input node and change last indice according to weight
      2. mark equal for input node last indice, weight first dim and bias dim.
      3. inherit input's computation, mark computation for last dim.
  
      Args:
          node (node)
          node_idx (int)
      """
      self._assign_indice_as_input(node, node_idx)
  
      if len(node.args) >= 2:
          weight = node.args[1]
          self._inherit_indice(weight, 1, node, -1)
      else:
          self._del_dim(node_idx, -1)
          self._add_dim(node_idx, -1)
      self._mark_computation(node, node_idx, [-1])
  
imports: import copy
  from typing import Dict, List
  from torch.fx.node import Node
  from .utils import NodeMgr, find_first_tensor_arg, flat_list, get_module_node_name, get_node_name, get_node_shape
label_desc: Use image node_id 21 for calling the TraceIndice obj's underlying member method code with example usage: obj._assign_linear_indice(node, node_idx) without return types