# Finding the dual basis of a space of rational functions?

I am trying to calculate the algebraic geometry codes (Function codes and Residue Code) for a given divisor. For calculating the function codes, sage directly provides a way to calculate the Riemann Roch Basis (they are rational functions). But, I need an explicit basis for the Residue code too (which is the dual of the function code).

So, essentially, when a basis (in terms of rational functions) is given, is there a way in sage to find the dual basis?