code: def barcollection(
      self,
      xs,
      opens,
      highs,
      lows,
      closes,
      width,
      tickwidth,
      label="_nolegend",
      scaling=1.0,
      bot=0,
      **kwargs,
  ):
      # Prepack different zips of the series values
      ihighlow = lambda: zip(xs, highs, lows)  # NOQA: E731
      iopen = lambda: zip(xs, opens)  # NOQA: E731
      iclose = lambda: zip(xs, closes)  # NOQA: E731
      openclose = lambda: zip(opens, closes)  # NOQA: E731
  
      colord = {True: self.colorup, False: self.colordown}
      colors = [colord[open < close] for open, close in openclose()]
  
      # Extra variables for the collections
      useaa = (0,)
      lw = (width,)
      tlw = (tickwidth,)
  
      # Calculate the barranges
      def barrange(i, high, low):
          return (i, low * scaling + bot), (i, high * scaling + bot)
  
      barranges = [
          barrange(i, high, low) for i, high, low in ihighlow()
      ]
  
      barcol = mcol.LineCollection(
          barranges,
          colors=colors,
          linewidths=lw,
          antialiaseds=useaa,
          label=label,
          **kwargs,
      )
  
      def tickopen(i, open):
          open = open * scaling + bot
          return (i - tickwidth, open), (i, open)
  
      openticks = [tickopen(i, open) for i, open in iopen()]
      opencol = mcol.LineCollection(
          openticks,
          colors=colors,
          antialiaseds=useaa,
          linewidths=tlw,
          label="_nolegend",
          **kwargs,
      )
  
      def tickclose(i, close):
          close = close * scaling + bot
          return (i, close), (i + tickwidth, close)
  
      closeticks = [tickclose(i, close) for i, close in iclose()]
      closecol = mcol.LineCollection(
          closeticks,
          colors=colors,
          antialiaseds=useaa,
          linewidths=tlw,
          label="_nolegend",
          **kwargs,
      )
  
      # return barcol, tickcol
      return barcol, opencol, closecol
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  from ..utils.py3 import range, zip
  import matplotlib.collections
  import matplotlib.colors
  import matplotlib.legend
  import matplotlib.lines
  from .utils import shade_color
label_desc: Use image node_id 3 for calling the OHLCPlotHandler obj's underlying member method code with example usage: obj.barcollection(xs, opens, highs, lows, closes, width, tickwidth, label, scaling, bot) and returns: barcol,  opencol,  closecol, i,  unknown,  i,  unknown, unknown,  open,  i,  open, i,  close,  unknown,  close