An emulation of the KEYNOTE-189 trial using electronic health records