class_docstr: Wandb class for plotly plots.
  
  Arguments:
      val: matplotlib or plotly figure
class_docstr_tok: ["Wandb","class","for","plotly","plots",".","Arguments",":","val",":","matplotlib","or","plotly","figure"]
code: def make_plot_media(
      cls: Type["Plotly"],
      val: Union["plotly.Figure", "matplotlib.artist.Artist"],
  ) -> Union[Image, "Plotly"]:
      if util.is_matplotlib_typename(util.get_full_typename(val)):
          if util.matplotlib_contains_images(val):
              return Image(val)
          val = util.matplotlib_to_plotly(val)
      return cls(val)
  
file_path: wandb/wandb/sdk/data_types/plotly.py
imports: import codecs
  import os
  from typing import TYPE_CHECKING, Sequence, Type, Union
  from wandb import util
  from wandb.sdk.lib import runid
  from ._private import MEDIA_TMP
  from .base_types.media import Media, _numpy_arrays_to_lists
  from .base_types.wb_value import WBValue
  from .image import Image
label_desc: Use image node_id 1 for calling the Plotly obj's underlying member method code with example usage: obj.make_plot_media(cls, val) and returns: cls, Image