Could you post the definition of SwichImplementation? It seems that some Python calls are using inside this method, which cannot be exported.
One workaround would be to split the method into a “Python method” and an exportable method using @torch.jit.ignore.