This SAGE code is written by Tolga Birkandan as an appendix to the article:
"Physical Examples of the Heun-to-Hypergeometric Reduction", arXiv:1401.0449 [math-ph].
See Table 2 of R. S. Maier, "The 192 Solutions of the Heun Equation", Math. Comp. 76 (2007), 811-843, arXiv:math/0408317 (line 5 & line 9 respectively) for the identities.
You can either download and install SAGE: http://www.sagemath.org/
or use it via SAGE Cloud: https://cloud.sagemath.com/
Please see the code for further comments and the usage.