docstr: Supports rich HTML display in a Jupyter notebook
docstr_tok: ["Supports","rich","HTML","display","in","a","Jupyter","notebook"]
code: def _repr_html_(self):
      """Supports rich HTML display in a Jupyter notebook"""
      # imported here to avoid depending on these packages unless actually used
      from io import BytesIO
      from base64 import b64encode
  
      b = BytesIO()
      self.to_pil().save(b, format="png")
  
      h = (
          """<img style="margin: auto; border:"""
          + str(self.border)
          + """px solid" """
          + """src='data:image/png;base64,{0}'/>""".format(
              b64encode(b.getvalue()).decode("utf-8")
          )
      )
      return h
  
imports: from __future__ import annotations
  from collections.abc import Iterator
  from io import BytesIO
  import warnings
  import numpy
  import numba
  import toolz
  import xarray
  import dask.array
  from PIL.Image import fromarray
  from datashader.colors import rgb, Sets1to3
  from datashader.utils import nansum_missing, ngjit
label_desc: Use image node_id 4 for calling the Image obj's underlying member method code with example usage: obj._repr_html_() and returns: h