code: def filled_hist(ax, edges, values, bottoms=None, orientation='v',
                  **kwargs):
      
      print(orientation)
      if orientation not in set('hv'):
          raise ValueError("orientation must be in {{'h', 'v'}} "
                           "not {o}".format(o=orientation))
  
      kwargs.setdefault('step', 'post')
      edges = np.asarray(edges)
      values = np.asarray(values)
      if len(edges) - 1 != len(values):
          raise ValueError('Must provide one more bin edge than value not: '
                           'len(edges): {lb} len(values): {lv}'.format(
                               lb=len(edges), lv=len(values)))
  
      if bottoms is None:
          bottoms = np.zeros_like(values)
      if np.isscalar(bottoms):
          bottoms = np.ones_like(values) * bottoms
  
      values = np.r_[values, values[-1]]
      bottoms = np.r_[bottoms, bottoms[-1]]
      if orientation == 'h':
          return ax.fill_betweenx(edges, values, bottoms,
                                  **kwargs)
      elif orientation == 'v':
          return ax.fill_between(edges, values, bottoms,
                                 **kwargs)
      else:
          raise AssertionError("you should never be here")
docs: Draw a histogram as a stepped patch.
  
      Extra kwargs are passed through to `fill_between`
  
      Parameters
      ----------
      ax : Axes
          The axes to plot to
  
      edges : array
          A length n+1 array giving the left edges of each bin and the
          right edge of the last bin.
  
      values : array
          A length n array of bin counts or values
  
      bottoms : scalar or array, optional
          A length n array of the bottom of the bars.  If None, zero is used.
  
      orientation : {'v', 'h'}
         Orientation of the histogram.  'v' (default) has
         the bars increasing in the positive y-direction.
  
      Returns
      -------
      ret : PolyCollection
          Artist added to the Axes