code: def test_apply_replacement_rules():
      # replacement rule should be at least 3 char long
      assert_raises(ValueError, apply_replacement_rules, "/", "some")
      assert_raises(
          ValueError, apply_replacement_rules, ["/a/b", "/"], "some"
      )
      # and pattern should have the separator only twice
      assert_raises(ValueError, apply_replacement_rules, "/ab", "some")
      assert_raises(
          ValueError, apply_replacement_rules, "/a/b/", "some"
      )
  
      eq_(apply_replacement_rules("/a/b", "abab"), "bbbb")
      eq_(apply_replacement_rules("/a/", "abab"), "bb")
      eq_(apply_replacement_rules(["/a/b"], "abab"), "bbbb")
      eq_(
          apply_replacement_rules(["/a/b", ",b,ab"], "abab"), "abababab"
      )
  
      # with regular expression groups
      eq_(
          apply_replacement_rules(r"/st(.*)n(.*)$/\1-\2", "string"),
          "ri-g",
      )
  
label_desc: Use image node_id 1 for calling a global function with example usage: test_apply_replacement_rules() without return types