code: def error_substr(s, r):
      """remove a part of the error message we don't want to compare"""
      return s.replace(r, "")
  
imports: import plotly.graph_objects
  from _plotly_utils.exceptions import PlotlyKeyError
  import pytest
label_desc: Use image node_id 1 for calling a global function with example usage: error_substr(s, r) and returns: s