code: def matmul_at_b_a(a, b):
      """
      Computes a.T @ b @ a, for a, b with rank 2 or 3.
  
      Supports automatic broadcasting of the "batch" dimension if the two inputs
      have different ranks.
      Supports any combination of dense and sparse inputs.
  
      :param a: Tensor or SparseTensor with rank 2 or 3.
      :param b: Tensor or SparseTensor with rank 2 or 3.
      :return: Tensor or SparseTensor with rank = max(rank(a), rank(b)).
      """
      at_b = modal_dot(a, b, transpose_a=True)
      at_b_a = modal_dot(at_b, a)
  
      return at_b_a
  
file_path: spektral/spektral/layers/ops/matmul.py
imports: import tensorflow
  from tensorflow.keras import backend
  from tensorflow.python.ops.linalg.sparse import sparse
  from .None import ops
label_desc: Use image node_id 4 for calling a global function with example usage: matmul_at_b_a(a, b) and returns: at_b_a