A program to calculate a general recoupling coefficient