code: def draw_cat_vars_hv(
      dfin,
      dep,
      nums,
      cats,
      chart_format,
      problem_type,
      mk_dir,
      verbose=0,
  ):
      ensure_hvplot_imported()
      ######## SCATTER PLOTS ARE USEFUL FOR COMPARING NUMERIC VARIABLES
      ##### we are going to modify dfin and classes, so we are making copies to make changes
      dft = copy.deepcopy(dfin)
      image_count = 0
      imgdata_list = list()
      N = len(nums)
      cols = 2
      width_size = 600
      height_size = 400
      jitter = 0.05
      alpha = 0.5
      size = 5
      transparent = 0.5
      colortext = "brycgkbyrcmgkbyrcmgkbyrcmgkbyr"
      colors = cycle("brycgkbyrcmgkbyrcmgkbyrcmgkbyr")
      plot_name = "cat_var_plots"
      #####################################################
      if problem_type == "Clustering":
          ### There is no depVar in clustering, so no need to add it to None
          pass
      elif problem_type == "Regression":
          if isinstance(dep, str):
              if dep not in nums:
                  nums.append(dep)
          else:
              nums += dep
              nums = find_remove_duplicates(nums)
      else:
          if isinstance(dep, str):
              if dep not in cats:
                  cats.append(dep)
          else:
              cats += dep
              cats = find_remove_duplicates(cats)
      ### This is where you draw the widgets #####################
      quantileable = [x for x in nums if len(dft[x].unique()) > 20]
      if len(quantileable) <= 1:
          quantileable = [x for x in nums if len(dft[x].unique()) > 2]
      cmap_list = [
          "Blues",
          "rainbow",
          "viridis",
          "plasma",
          "inferno",
          "magma",
          "cividis",
      ]
      ### The X axis should be cat vars and the Y axis should be numeric vars ######
      x = pnw.Select(name="X-Axis", value=cats[0], options=cats)
      y = pnw.Select(
          name="Y-Axis", value=quantileable[0], options=quantileable
      )
  
      ## you need to decorate this function with depends to make the widgets change axes real time ##
      @pn.depends(x.param.value, y.param.value)
      def create_figure(x, y):
          # opts = dict(cmap=cmap_list[0], line_color='black')
          opts = dict(
              cmap=cmap_list[0],
              width=width_size,
              height=height_size,
              line_color="black",
              xrotation=70,
              title="Average of each numeric var by categorical var",
          )
          ### If it is None, don't stack it
          opts["color"] = next(colors)
          opts["alpha"] = alpha
          opts["tools"] = ["hover"]
          opts["toolbar"] = "above"
          opts["colorbar"] = True
          conti_df = dft[[x, y]].groupby(x).mean().reset_index()
          return hv.Bars(conti_df).opts(**opts)
  
      widgets = pn.WidgetBox(x, y)
  
      hv_panel = pn.Row(widgets, create_figure).servable(
          "Cross-selector"
      )
      #####################################################
      ##### Save all the chart objects here ##############
      if verbose == 2:
          imgdata_list = append_panels(
              hv_panel, imgdata_list, chart_format
          )
          image_count += 1
      if chart_format in ["server", "bokeh_server", "bokeh-server"]:
          # server = pn.serve(hv_panel, start=True, show=True)
          print("%s can be found in URL below:" % plot_name)
          hv_panel.show()
      elif chart_format == "html":
          save_html_data(hv_panel, chart_format, plot_name, mk_dir)
      else:
          display(
              hv_panel
          )  ### This will display it in a Jupyter Notebook. If you want it on a server, you use drawobj.show()
      return hv_panel
  
imports: import numpy
  import pandas
  from autoviz.AutoViz_Utils import *
  import copy
  import warnings
  import logging
  import warnings
  from sklearn.exceptions import DataConversionWarning
  import matplotlib
  import matplotlib.pyplot
  import io
  import seaborn
  import re
  import pdb
  import pprint
  import matplotlib
  from itertools import cycle, combinations
  from collections import defaultdict
  import copy
  import time
  import sys
  import random
  import xlrd
  import statsmodels
  from io import BytesIO
  import base64
  from functools import reduce
  import traceback
  import xgboost
  from xgboost.sklearn import XGBClassifier
  from xgboost.sklearn import XGBRegressor
  import os
  from .classify_method import classify_columns
label_desc: Use image node_id 10 for calling a global function with example usage: draw_cat_vars_hv(dfin, dep, nums, cats, chart_format, problem_type, mk_dir, verbose) and returns: hv_panel, hv