code: def format_error(error):
      formatted_error = {
          "message": error.message,
      }
      if error.locations is not None:
          formatted_error["locations"] = [
              {"line": loc.line, "column": loc.column}
              for loc in error.locations
          ]
  
      return formatted_error
  
label_desc: Use image node_id 1 for calling a global function with example usage: format_error(error) and returns: formatted_error