What's best way to determine Pimoroni product from MicroPython?

For the specific case of the Inky Frames there’s a hardware difference between 5.7" and 4" shown on schematic, latter has a 10k pull up on SWITCH_LATCH and a note saying

Pull-up on SWITCH_LATCH is used to detect the display size (4.0")

I’d imagine a battle between weak (50-80) internal pull down and that 10k is used to distinguish between the two. That doesn’t sound like a very flexible approach for future variations but it’s better than nothing.