code: def mview_serializer(instance, widget):
      return {
          "data": memoryview(instance.data) if instance.data else None
      }
  
imports: import pytest
  from traitlets import Bool, Tuple, List, Instance, CFloat, CInt, Float, Int, TraitError, observe
  from .utils import setup, teardown
  import ipywidgets
  from ipywidgets import Widget
label_desc: Use image node_id 3 for calling a global function with example usage: mview_serializer(instance, widget) and returns: dict