code: def scatter_matrix(df, theme=None, bins=10, color="grey", size=2):
      """
      Displays a matrix with scatter plot for each pair of
      Series in the DataFrame.
      The diagonal shows a histogram for each of the Series
  
      Parameters:
      -----------
              df : DataFrame
                      Pandas DataFrame
              theme : string
                      Theme to be used (if not the default)
              bins : int
                      Number of bins to use for histogram
              color : string
                      Color to be used for each scatter plot
              size : int
                      Size for each marker on the scatter plot
      """
      if not theme:
          theme = auth.get_config_file()["theme"]
  
      figs = []
      for i in df.columns:
          for j in df.columns:
              if i == j:
                  fig = df.iplot(
                      kind="histogram",
                      keys=[i],
                      asFigure=True,
                      bins=bins,
                  )
                  figs.append(fig)
              else:
                  figs.append(
                      df.iplot(
                          kind="scatter",
                          mode="markers",
                          x=j,
                          y=i,
                          asFigure=True,
                          size=size,
                          colors=[color],
                      )
                  )
      layout = getLayout(theme)
      layout["xaxis"].update(showgrid=False)
      layout["yaxis"].update(showgrid=False)
      sm = subplots(
          figs,
          shape=(len(df.columns), len(df.columns)),
          shared_xaxes=False,
          shared_yaxes=False,
          horizontal_spacing=0.05,
          vertical_spacing=0.07,
          base_layout=layout,
      )
      sm["layout"].update(bargap=0.02, showlegend=False)
      return sm
  
imports: import copy
  import numpy
  import pandas
  import plotly.offline
  import plotly.figure_factory
  from plotly.graph_objs import Figure, Scatter, Line
  from plotly.subplots import make_subplots
  from .None import themes
  from .None import auth, ta
  from .colors import normalize, to_rgba
  from .utils import check_kwargs, deep_update, dict_replace_keyword, kwargs_from_keyword, merge_dict, is_list, make_list
label_desc: Use image node_id 14 for calling a global function with example usage: scatter_matrix(df, theme, bins, color, size) and returns: sm