parameters: (self, indices: Set["index"])
docstring: Collects all index accesses reachable through this expression.
docstring_summary: Collects all index accesses reachable through this expression.
docstring_tokens: Collects all index accesses reachable through this expression .
function: def collect_indices(self, indices: Set["index"]):
      """Collects all index accesses reachable through this expression."""
  
      def visit_index(expr):
        if isinstance(expr, index):
          indices.add(expr)
  
      self.visit_tensor_exprs(visit_index)
function_tokens: def collect_indices ( self , indices : Set [ "index" ] ) : def visit_index ( expr ) : if isinstance ( expr , index ) : indices . add ( expr ) self . visit_tensor_exprs ( visit_index )