code: def mock_post(self, msg, msg_id=None, assert_msg=None):
      """Mock the widget's `post()` method so we can introspect the contents."""
      assert msg == assert_msg
  
imports: from datetime import date, datetime
  from functools import partial
  from types import MethodType
  import numpy
  from perspective import PerspectiveError, PerspectiveWidget, Table
  from pytest import raises
label_desc: Use image node_id 1 for calling a global function with example usage: mock_post(msg, msg_id, assert_msg) without return types