def METHOD_NAME(fig1, pretty, remove_uids):
    # Configure file-like mock
    filemock = MagicMock(spec=Path)
    # write_json to mock file
    pio.write_json(fig1, filemock, pretty=pretty, remove_uids=remove_uids)
    # check write contents
    expected = pio.to_json(fig1, pretty=pretty, remove_uids=remove_uids)
    filemock.write_text.assert_called_once_with(expected)