code: def material_from_object(self, p):
      # TODO: do this without scenetree_json()
      t = p.texture.scenetree_json()
      m = MeshLambertMaterial(side="DoubleSide")
      m.color = t["color"]
      m.opacity = t["opacity"]
      # TODO: support other attributes
      return m
  
imports: from ipywidgets import Widget, widget_serialization
  from traitlets import Unicode, CInt, Instance, List, CFloat, Bool, observe, validate
  import numpy
  from ._package import npm_pkg_name
  from ._version import EXTENSION_SPEC_VERSION
  from .core.BufferAttribute import BufferAttribute
  from .core.Geometry import Geometry
  from .core.BufferGeometry import BufferGeometry
  from .geometries.BoxGeometry_autogen import BoxGeometry
  from .geometries.SphereGeometry_autogen import SphereGeometry
  from .lights.AmbientLight_autogen import AmbientLight
  from .lights.DirectionalLight_autogen import DirectionalLight
  from .materials.Material_autogen import Material
  from .materials.MeshLambertMaterial_autogen import MeshLambertMaterial
  from .materials.SpriteMaterial_autogen import SpriteMaterial
  from .objects.Group_autogen import Group
  from .objects.Line_autogen import Line
  from .objects.Mesh_autogen import Mesh
  from .objects.Sprite_autogen import Sprite
  from .textures.Texture_autogen import Texture
  from .textures.DataTexture import DataTexture
  from .textures.TextTexture_autogen import TextTexture
label_desc: Use image node_id 2 for calling the PlotMesh obj's underlying member method code with example usage: obj.material_from_object(p) and returns: m