code: def validate_scatterplotmatrix(
      df, index, diag, colormap_type, **kwargs
  ):
      """
      Validates basic inputs for FigureFactory.create_scatterplotmatrix()
  
      :raises: (PlotlyError) If pandas is not imported
      :raises: (PlotlyError) If pandas dataframe is not inputted
      :raises: (PlotlyError) If pandas dataframe has <= 1 columns
      :raises: (PlotlyError) If diagonal plot choice (diag) is not one of
          the viable options
      :raises: (PlotlyError) If colormap_type is not a valid choice
      :raises: (PlotlyError) If kwargs contains 'size', 'color' or
          'colorscale'
      """
      if not pd:
          raise ImportError(
              "FigureFactory.scatterplotmatrix requires "
              "a pandas DataFrame."
          )
  
      # Check if pandas dataframe
      if not isinstance(df, pd.core.frame.DataFrame):
          raise exceptions.PlotlyError(
              "Dataframe not inputed. Please "
              "use a pandas dataframe to pro"
              "duce a scatterplot matrix."
          )
  
      # Check if dataframe is 1 column or less
      if len(df.columns) <= 1:
          raise exceptions.PlotlyError(
              "Dataframe has only one column. To "
              "use the scatterplot matrix, use at "
              "least 2 columns."
          )
  
      # Check that diag parameter is a valid selection
      if diag not in DIAG_CHOICES:
          raise exceptions.PlotlyError(
              "Make sure diag is set to "
              "one of {}".format(DIAG_CHOICES)
          )
  
      # Check that colormap_types is a valid selection
      if colormap_type not in VALID_COLORMAP_TYPES:
          raise exceptions.PlotlyError(
              "Must choose a valid colormap type. "
              "Either 'cat' or 'seq' for a cate"
              "gorical and sequential colormap "
              "respectively."
          )
  
      # Check for not 'size' or 'color' in 'marker' of **kwargs
      if "marker" in kwargs:
          FORBIDDEN_PARAMS = ["size", "color", "colorscale"]
          if any(
              param in kwargs["marker"] for param in FORBIDDEN_PARAMS
          ):
              raise exceptions.PlotlyError(
                  "Your kwargs dictionary cannot "
                  "include the 'size', 'color' or "
                  "'colorscale' key words inside "
                  "the marker dict since 'size' is "
                  "already an argument of the "
                  "scatterplot matrix function and "
                  "both 'color' and 'colorscale "
                  "are set internally."
              )
  
file_path: plotly.py/packages/python/plotly/plotly/figure_factory/_scatterplot.py
imports: from plotly import exceptions, optional_imports
  import plotly.colors
  from plotly.figure_factory import utils
  from plotly.graph_objs import graph_objs
  from plotly.subplots import make_subplots
label_desc: Use image node_id 3 for calling a global function with example usage: validate_scatterplotmatrix(df, index, diag, colormap_type) without return types