code: def sample_histograms(fig, input_sample, problem, opts=None):
      """Plots a set of subplots of histograms of the input sample"""
      if opts is None:
          opts = {}
  
      num_vars = problem["num_vars"]
      names = problem["names"]
  
      framing = 101 + (num_vars * 10)
  
      # Find number of levels
      num_levels = len(set(input_sample[:, 1]))
  
      out = []
  
      for variable in range(num_vars):
          ax = fig.add_subplot(framing + variable)
          out.append(
              ax.hist(
                  input_sample[:, variable],
                  bins=num_levels,
                  density=False,
                  label=None,
                  **opts,
              )
          )
  
          ax.set_title("%s" % (names[variable]))
          ax.tick_params(
              axis="x",  # changes apply to the x-axis
              which="both",  # both major and minor ticks are affected
              bottom="off",  # ticks along the bottom edge are off
              top="off",  # ticks along the top edge are off
              labelbottom="off",
          )  # labels along the bottom edge off)
          if variable > 0:
              ax.tick_params(
                  axis="y",  # changes apply to the y-axis
                  which="both",  # both major and minor ticks affected
                  labelleft="off",
              )  # labels along the left edge off)
  
      return out
  
imports: import numpy
label_desc: Use image node_id 5 for calling a global function with example usage: sample_histograms(fig, input_sample, problem, opts) and returns: out