code: def cornerplot(results, logger=None):
      """Make a corner plot with corner."""
      paramnames = results["paramnames"]
      data = np.array(results["weighted_samples"]["points"])
      weights = np.array(results["weighted_samples"]["weights"])
      cumsumweights = np.cumsum(weights)
  
      mask = cumsumweights > 1e-4
  
      if mask.sum() == 1:
          if logger is not None:
              warn = (
                  "Posterior is still concentrated in a single point:"
              )
              for i, p in enumerate(paramnames):
                  v = results["samples"][mask, i]
                  warn += "\n" + "    %-20s: %s" % (p, v)
  
              logger.warning(warn)
              logger.info("Try running longer.")
          return
  
      # monkey patch to disable a useless warning
      oldfunc = logging.warning
      logging.warning = lambda *args, **kwargs: None
      corner.corner(
          data[mask, :],
          weights=weights[mask],
          labels=paramnames,
          show_titles=True,
          quiet=True,
      )
      logging.warning = oldfunc
  
imports: from __future__ import print_function, division
  from six.moves import range
  import logging
  import types
  import warnings
  import numpy
  import matplotlib.pyplot
  from matplotlib.ticker import MaxNLocator, NullLocator
  from matplotlib.ticker import ScalarFormatter
  import scipy.stats
  import matplotlib.pyplot
  import numpy
  from .utils import resample_equal
  from .utils import quantile
  import corner
label_desc: Use image node_id 1 for calling a global function with example usage: cornerplot(results, logger) without return types