private function getSegmentsHtml(&$segments) {
    $html = '<h3>Segments Collection</h3>' .
            $this->getCollectionInfoHtml($segments);

    $items = $segments->getItems();

    if (count($items) == 0) {
      $html .= '<p>No Segments Found</p>';
    } else {
      foreach ($items as &$segment) {
        $html .= <<<HTML
<hr>
<pre>
Segment ID = {$segment->getId()}
Kind       = {$segment->getKind()}
Self Link  = {$segment->getSelfLink()}
Name       = {$segment->getName()}
Definition = {$segment->getDefinition()}
Created    = {$segment->getCreated()}
Updated    = {$segment->getUpdated()}
</pre>
HTML;
      }
    }
    return $html;
  }