code: def add_assert_screenshot_methods(context_or_world, scenario):
      
      file_suffix = scenario.name
  
      def assert_screenshot(element_or_selector, filename, threshold=0, exclude_elements=[], driver_wrapper=None,
                            force=False):
          VisualTest(driver_wrapper, force).assert_screenshot(element_or_selector, filename, file_suffix, threshold,
                                                              exclude_elements)
  
      def assert_full_screenshot(filename, threshold=0, exclude_elements=[], driver_wrapper=None, force=False):
          VisualTest(driver_wrapper, force).assert_screenshot(None, filename, file_suffix, threshold, exclude_elements)
  
      # Monkey patching assert_screenshot method in PageElement to use the correct test name
      def assert_screenshot_page_element(self, filename, threshold=0, exclude_elements=[], force=False):
          VisualTest(self.driver_wrapper, force).assert_screenshot(self.web_element, filename, file_suffix, threshold,
                                                                   exclude_elements)
  
      context_or_world.assert_screenshot = assert_screenshot
      context_or_world.assert_full_screenshot = assert_full_screenshot
      PageElement.assert_screenshot = assert_screenshot_page_element
docs: Add assert screenshot methods to behave or lettuce object
  
      :param context_or_world: behave context or lettuce world
      :param scenario: running scenario