code: def _take_screenshot(self):
          
          # screen size: 1280x720
          if self._fail_first_screenshot:
              self._fail_first_screenshot = False
              raise IOError("dummy fail screenshot")
          screen_path = os.path.join(__dir__, '../../tests/media/dummy_screen.png')
          screen = Image.open(screen_path)
          return screen
docs: Take a screenshot