How to upgrade a 2009 MacBook Pro from 10.11.6 to 10.12?
The maximum supported OS for all of the MacBook Pros released in 2009 is OS X El Capitan 10.11.6 (15G31).
So your model of MacBook Pro can not be officially upgraded to macOS Sierra 10.12.
The newest version that is Apple supported for a 2009 MacBook Pro is OS X 10.11.6; however, there is a third-party patcher, macOS Sierra Patcher Tool for Unsupported Macs, by dosdude1 if you want to go that route.
If you want to go the dosdude1 route, you can get the InstallOS.dmg file for macOS Sierra from a link in How to upgrade to macOS Sierra, under step 4 Download macOS Sierra where it says:
If you still need macOS Sierra, use this link: Download macOS Sierra. A file named InstallOS.dmg will download to your Mac.
Note: I am not affiliated with dosdude1, and only know about this from seeing it on the Internet.