code: def _resize_logo(self, logo_image):
      logo_width, logo_height = logo_image.size
  
      # TODO smart scaling of logos
      target_height = int(self._chart.style.plot_height * 0.1)
  
      if logo_width == logo_height:
          logo_image = logo_image.resize(
              (target_height, target_height), resample=Image.LANCZOS
          )
      else:
          logo_width_to_height = logo_width * 1.0 / logo_height
          logo_image = logo_image.resize(
              (
                  int(logo_width_to_height * target_height),
                  target_height,
              ),
              resample=Image.LANCZOS,
          )
      return logo_image
  
imports: from collections import OrderedDict
  from functools import wraps
  import io
  from io import BytesIO
  import tempfile
  import warnings
  import bokeh
  from bokeh.io.export import _SVG_SCRIPT, wait_until_render_complete
  import bokeh.plotting
  from bokeh.embed import file_html
  from bokeh.resources import INLINE
  from IPython.display import display
  from PIL import Image
  from PIL.Image import Resampling
  from selenium import webdriver
  from selenium.webdriver.chrome.options import Options
  from chartify._core.style import Style
  from chartify._core.axes import BaseAxes, SecondYNumericalAxis, SecondAxis
  from chartify._core.plot import BasePlot
  from chartify._core.callout import Callout
  from chartify._core.options import options
label_desc: Use image node_id 3 for calling the Logo obj's underlying member method code with example usage: obj._resize_logo(logo_image) and returns: logo_image