docs: def from_Bar(bar, width=40, tuning=None, collapse=True):
      """Convert a mingus.containers.Bar object to ASCII tablature.
  
      Throw a FingerError if no playable fingering can be found.
  
      'tuning' should be a StringTuning object or None for the default tuning.
      If 'collapse' is False this will return a list of lines, if it's True
      all lines will be concatenated with a newline symbol.
  
      Use 'string' and 'fret' attributes on Notes to force certain fingerings.
      """
      if tuning is None:
          tuning = default_tuning
  
      # Size of a quarter note
      qsize = _get_qsize(tuning, width)
      result = begin_track(tuning, max(2, qsize / 2))
  
      # Add bar
      for entry in bar.bar:
          (beat, duration, notes) = entry
          fingering = tuning.find_fingering(notes)
          if fingering != [] or notes is None:
  
              # Do an attribute check
              f = []
              attr = []
              if notes is not None:
                  for note in notes:
                      if hasattr(note, 'string') and hasattr(note, 'fret'):
                          n = tuning.get_Note(note.string, note.fret)
                          if n is not None and int(n) == int(note):
                              f.append((note.string, note.fret))
                              attr.append(int(note))
  
              # See if there are any possible fingerings with the attributes that
              # are set.
              fres = []
              if f != []:
                  for x in fingering:
                      found = True
                      for pos in f:
                          if pos not in x:
                              found = False
                      if found:
                          fres.append(x)
  
              # Use best fingering.
              maxlen = 0
              if fres != []:
                  f = fres[0]
              else:
                  # Use default fingering if attributes don't make sense
                  if notes is None:
                      f = []
                      maxlen = 1
                  else:
                      f = fingering[0]
  
              # Make {string: fret} dictionary and find highest fret
              d = {}
              for (string, fret) in f:
                  d[string] = str(fret)
                  if len(str(fret)) > maxlen:
                      maxlen = len(str(fret))
  
              # Add to result
              for i in range(len(result)):
                  dur = int(((1.0 / duration) * qsize) * 4) - maxlen
                  if i not in d.keys():
                      result[i] += '-' * maxlen + '-' * dur
                  else:
                      result[i] += ('%' + str(maxlen) + 's') % d[i] + '-' * dur
          else:
              raise FingerError('No playable fingering found for: %s' % notes)
  
      # Padding at the end
      l = len(result[i]) + 1
      for i in range(len(result)):
          result[i] += (width - l) * '-' + '|'
      result.reverse()
  
      # Mark quarter notes
      pad = ' ' * int(((1.0 / bar.meter[1]) * qsize) * 4 - 1)
      r = ' ' * (result[0].find('||') + 2 + max(2, qsize / 2)) + ('*' + pad)\
           * bar.meter[0]
      r += ' ' * (len(result[0]) - len(r))
      if not collapse:
          return [r] + result
      else:
          return os.linesep.join([r] + result)