code: def from_NoteContainer(nc, duration=None, standalone=True):
      
      # Throw exception
      if nc is not None and not hasattr(nc, 'notes'):
          return False
  
      # Return rests for None or empty lists
      if nc is None or len(nc.notes) == 0:
          result = 'r'
      elif len(nc.notes) == 1:
  
      # Return a single note if the list contains only one note
          result = from_Note(nc.notes[0], standalone=False)
      else:
          # Return the notes grouped in '<' and '>'
          result = '<'
          for notes in nc.notes:
              result += from_Note(notes, standalone=False) + ' '
          result = result[:-1] + '>'
  
      # Add the duration
      if duration != None:
          parsed_value = value.determine(duration)
  
          # Special case: check for longa and breve in the duration (issue #37)
          dur = parsed_value[0]
          if dur == value.longa:
              result += '\\longa'
          elif dur == value.breve:
              result += '\\breve'
          else:
              result += str(int(parsed_value[0]))
          for i in range(parsed_value[1]):
              result += '.'
      if not standalone:
          return result
      else:
          return '{ %s }' % result
docs: Get a NoteContainer object and return the LilyPond equivalent in a
      string.
  
      The second argument determining the duration of the NoteContainer is
      optional. When the standalone argument is True the result of this
      function can be used directly by functions like to_png. It is mostly
      here to be used by from_Bar.