Make get_trace_matrices function public