text: import abjad
  import collections
  import consort
  from abjad.tools import systemtools
  from abjad.tools import templatetools
  
  
  final_segment_metadata = collections.OrderedDict(
      segment_count=1,
      segment_number=1,
      )
  
  
  def test_SegmentMaker_is_final_segment_01():
      segment_maker = consort.SegmentMaker(
          discard_final_silence=True,
          desired_duration_in_seconds=4,
          omit_stylesheets=True,
          score_template=templatetools.GroupedRhythmicStavesScoreTemplate(
              staff_count=1,
              ),
          settings=None,
          tempo=abjad.MetronomeMark((1, 4), 60),
          permitted_time_signatures=((4, 4),),
          )
      lilypond_file, metadata = segment_maker(
          segment_metadata=final_segment_metadata,
          )
      assert format(lilypond_file) == abjad.String.normalize(
          r'''
          \version "2.19.65"
          \language "english"
  
          #(ly:set-option 'relative-includes #t)
  
          \score {
              \context Score = "Grouped Rhythmic Staves Score" <<
                  \tag #'time
                  \context TimeSignatureContext = "Time Signature Context" {
                      {
                          \tempo 4=60
                          \time 4/4
                          s1 * 1
                      }
                  }
                  \context StaffGroup = "Grouped Rhythmic Staves Staff Group" <<
                      \context RhythmicStaff = "Staff 1" {
                          \context Voice = "Voice 1" {
                              {
                                  % [Voice 1] Measure 1
                                  {
                                      \stopStaff
                                      \once \override Staff.StaffSymbol.line-positions = #'(0)
                                      \startStaff
                                      R1 * 1
                                      \bar "|."
                                  }
                              }
                          }
                      }
                  >>
              >>
          }
          ''')
  