What is "torch._thnn.type2backend"?

I am trying to revive an old software and found this import: torch._thnn with only one method: type2backend.
It appears to be old PyTorch module, but I cannot find how to replace it.
Any idea how to rewrite this to modern PyTorch?

I think this method was used to call backend methods through the Python API. You should now be able to use the exposed methods directly.

Do you mean that “type2backend[type(input)]” would be equivalent to just using “input” now?