'Internal helper function to broadcast + scale ls/lw
In the collection drawing code the linewidth and linestyle are
cycled through as circular buffers (via v[i % len(v)]).  Thus,
if we are going to scale the dash pattern at set time (not
draw time) we need to do the broadcasting now and expand both
lists to be the same length.
Parameters
linewidths : list
line widths of collection
dashes : list
dash specification (offset, (dash pattern tuple))
Returns
linewidths, dashes : list
Will be the same length, dashes are scaled by paired linewidth'

@staticmethod
def _bcast_lwls(linewidths, dashes):

    if mpl.rcParams[u'_internal.classic_mode']:
        return (linewidths, dashes)
    if (len(dashes) != len(linewidths)):
        l_dashes = len(dashes)
        l_lw = len(linewidths)
        GCD = gcd(l_dashes, l_lw)
        dashes = (list(dashes) * (l_lw // GCD))
        linewidths = (list(linewidths) * (l_dashes // GCD))
    dashes = [mlines._scale_dashes(o, d, lw) for ((o, d), lw) in zip(dashes, linewidths)]
    return (linewidths, dashes)
