A python implementation of the transfer matrix method for multilayer structures with arbitrary dielectric tensors