code: def draw_pair_scatters_hv(
      dfin,
      nums,
      problem_type,
      chart_format,
      dep=None,
      classes=None,
      lowess=False,
      mk_dir="AutoViz_Plots",
      verbose=0,
  ):
      """
      #### PAIR SCATTER PLOTS ARE NEEDED ONLY FOR CLASSIFICATION PROBLEMS IN NUMERIC VARIABLES
      ### This is where you plot a pair-wise scatter plot of Independent Variables against each other####
      """
      ensure_hvplot_imported()
      dft = dfin[:]
      image_count = 0
      imgdata_list = list()
      if len(nums) <= 1:
          return
      classes = copy.deepcopy(classes)
      height_size = 400
      width_size = 600
      alpha = 0.5
      bubble_size = 10
      cmap_list = [
          "rainbow",
          "viridis",
          "plasma",
          "inferno",
          "magma",
          "cividis",
      ]
      plot_name = "pair_scatters"
      colors = cycle("brycgkbyrcmgkbyrcmgkbyrcmgkbyr")
      ###########################################################################
      if problem_type in ["Regression", "Clustering"]:
          ########## This is for Regression problems ##########
          #########  Here we plot a pair-wise scatter plot of Independent Variables ####
          ### Only 1 color is needed since only 2 vars are plotted against each other ##
          ################################################################################################
          #####  This widgetbox code works but it doesn't change the x- and y-axis when you change variables
          ################################################################################################
          # x = pn.widgets.Select(name='x', options=nums)
          # y = pn.widgets.Select(name='y', options=nums)
          # kind = pn.widgets.Select(name='kind', value='scatter', options=['bivariate', 'scatter'])
          ### Let us say you want to change the range of the x axis
          ## - Then you can explicitly set the limits and it works!
          # xlimi = (dft[x.value].min(), dft[x.value].max())
          # ylimi = (dft[y.value].min(), dft[y.value].max())
          # plot = dft.hvplot(x=x, y=y, kind=kind,  color=next(colors), alpha=0.5, xlim=xlimi, ylim=ylimi,
          #            title='Pair-wise Scatter Plot of two Independent Numeric variables')
          # hv_panel = pn.Row(pn.WidgetBox(x, y, kind),plot)
          ########################   This is the new way of drawing scatter   ###############################
  
          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
              ]
  
          x = pnw.Select(
              name="X-Axis", value=quantileable[0], options=quantileable
          )
          y = pnw.Select(
              name="Y-Axis", value=quantileable[1], options=quantileable
          )
          size = pnw.Select(
              name="Size", value="None", options=["None"] + quantileable
          )
          if problem_type == "Clustering":
              ### There is no depVar in clustering, so no need to add it to None
              color = pnw.Select(
                  name="Color", value="None", options=["None"]
              )
          else:
              color = pnw.Select(
                  name="Color", value="None", options=["None", dep]
              )
  
          ## you need to decorate this function with depends to make the widgets change axes real time ##
          @pn.depends(x.param.value, y.param.value, color.param.value)
          def create_figure(x, y, color):
              opts = dict(
                  cmap=cmap_list[0],
                  width=width_size,
                  height=height_size,
                  line_color="black",
              )
              if color != "None":
                  opts["color"] = color
              opts["size"] = bubble_size
              opts["alpha"] = alpha
              opts["tools"] = ["hover"]
              opts["toolbar"] = "above"
              opts["colorbar"] = True
              opts[
                  "title"
              ] = "Pair-wise Scatter Plot of two Independent Numeric variables"
              return hv.Points(
                  dft,
                  [x, y],
                  label="%s vs %s" % (x.title(), y.title()),
              ).opts(**opts)
  
          widgets = pn.WidgetBox(x, y, color)
  
          hv_panel = pn.Row(widgets, create_figure).servable(
              "Cross-selector"
          )
          ########################   This is the old way of drawing scatter  ################################
          # colors = cycle('brycgkbyrcmgkbyrcmgkbyrcmgkbyr')
          # def load_symbol(symbol, variable, **kwargs):
          #    color = next(colors)
          #    return hv.Scatter((dft[symbol].values,dft[variable].values)).opts(framewise=True).opts(size=5,
          #            color=color, alpha=alpha, height=height_size, width=width_size).opts(
          #            xlabel='%s' %symbol).opts(ylabel='%s' %variable).opts(
          #           title='Scatter Plot of %s against %s variable' %(symbol,variable))
          ### This is where you create the dynamic map and pass it the variable to load the chart!
          # dmap = hv.DynamicMap(load_symbol, kdims=['Select_X','Select_Y']).redim.values(Select_X=nums, Select_Y=nums).opts(framewise=True)
          ###########  This is where you put the Panel Together ############
          # hv_panel = pn.panel(dmap)
          # widgets = hv_panel[0]
          # hv_panel = pn.Column(pn.Row(*widgets))
          ########################   End of the old way of drawing scatter  ################################
          if verbose == 2:
              imgdata_list = append_panels(
                  hv_panel, imgdata_list, chart_format
              )
              image_count += 1
      else:
          ########## This is for Classification problems ##########
          #########  This is the new way to plot a pair-wise scatter plot ####
          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
              ]
  
          x = pnw.Select(
              name="X-Axis", value=quantileable[0], options=quantileable
          )
          y = pnw.Select(
              name="Y-Axis", value=quantileable[1], options=quantileable
          )
          size = pnw.Select(
              name="Size", value="None", options=["None"] + quantileable
          )
          color = pnw.Select(
              name="Color", value="None", options=["None", dep]
          )
  
          @pn.depends(x.param.value, y.param.value, color.param.value)
          def create_figure(x, y, color):
              opts = dict(
                  cmap=cmap_list[0],
                  width=width_size,
                  height=height_size,
                  line_color="black",
              )
              if color != "None":
                  opts["color"] = color
              else:
                  opts["color"] = next(colors)
              opts["size"] = bubble_size
              opts["alpha"] = alpha
              opts["tools"] = ["hover"]
              opts["toolbar"] = "above"
              opts["colorbar"] = True
              opts[
                  "title"
              ] = "Pair-wise Scatter Plot of two Independent Numeric variables"
              return hv.Points(
                  dft,
                  [x, y],
                  label="%s vs %s" % (x.title(), y.title()),
              ).opts(**opts)
  
          widgets = pn.WidgetBox(x, y, color)
  
          hv_panel = pn.Row(widgets, create_figure).servable(
              "Cross-selector"
          )
          #########  This is an old way to plot a pair-wise scatter plot ####
          # target_vars = dft[dep].unique()
          # x = pn.widgets.Select(name='x', options=nums)
          # y = pn.widgets.Select(name='y', options=nums)
          # kind = pn.widgets.Select(name='kind', value='scatter', options=['bivariate', 'scatter'])
  
          # plot = dft.hvplot(x=x, y=y, kind=kind, by=dep, height=height_size, alpha=0.5,
          #                title='Pair-wise Scatter Plot of two Independent Numeric variables')
          # hv_panel = pn.Row(pn.WidgetBox(x, y, kind), plot)
          if verbose == 2:
              imgdata_list = append_panels(
                  hv_panel, imgdata_list, chart_format
              )
              image_count += 1
      ####### End of Pair Scatter Plots ######
      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 13 for calling a global function with example usage: draw_pair_scatters_hv(dfin, nums, problem_type, chart_format, dep, classes, lowess, mk_dir, verbose) and returns: hv_panel, hv, hv