class_docstr: Base class for Image, Audio and Video widgets.
  
  The `value` of this widget accepts a byte string.  The byte string is the
  raw data that you want the browser to display.
  
  If you pass `"url"` to the `"format"` trait, `value` will be interpreted
  as a URL as bytes encoded in UTF-8.
code: def _guess_format(cls, tag, filename):
      # file objects may have a .name parameter
      name = getattr(filename, "name", None)
      name = name or filename
  
      try:
          mtype, _ = mimetypes.guess_type(name)
          if not mtype.startswith("{}/".format(tag)):
              return None
  
          return mtype[len("{}/".format(tag)) :]
      except Exception:
          return None
  
imports: import mimetypes
  from .widget_core import CoreWidget
  from .domwidget import DOMWidget
  from .valuewidget import ValueWidget
  from .widget import register
  from traitlets import Unicode, CUnicode, Bool
  from .trait_types import CByteMemoryView
label_desc: Use image node_id 5 for calling the _Media obj's underlying member method code with example usage: obj._guess_format(cls, tag, filename) and returns: mtype, None, None