code: def check_error_string(call, exception, correct_str, subs):
      raised = False
      try:
          call()
      except exception as e:
          raised = True
          msg = e.args[0]
          for pat, rep in subs:
              msg = msg.replace(pat, rep, 1)
          print("MSG")
          print(msg)
          print("CORRECT")
          print(correct_str)
          assert msg == correct_str
      assert raised
  
imports: import plotly.graph_objects
  from _plotly_utils.exceptions import PlotlyKeyError
  import pytest
label_desc: Use image node_id 11 for calling a global function with example usage: check_error_string(call, exception, correct_str, subs) without return types