code: def matmul_adjoint_y(dz, x, y, transpose_a, transpose_b):
    
    if not transpose_a and not transpose_b:
      return tf.matmul(x, dz, transpose_a=True)
    elif not transpose_a and transpose_b:
      return tf.matmul(dz, x, transpose_a=True)
    elif transpose_a and not transpose_b:
      return tf.matmul(x, dz)
    else:  # transpose_a and transpose_b
      return tf.matmul(dz, x, transpose_a=True, transpose_b=True)
docs: Implementation of dtfmatmul, separate for readability.