                                                        button: MenuButton)
 }
 
+// swiftlint:disable type_body_length
 /// A view controller that displays experiment items in a list.
 class ExperimentItemsViewController: VisibilityTrackingViewController,
     UICollectionViewDataSource,

  }

}


  // MARK: - UICollectionViewDelegate

  func collectionView(_ collectionView: UICollectionView,
                      layout collectionViewLayout: UICollectionViewLayout,
                      insetForSectionAt section: Int) -> UIEdgeInsets {
    // Determine the last section with items.
    var lastSectionWithItems: Int?
    for i in 0..<experimentDataSource.numberOfSections {
      if experimentDataSource.numberOfItemsInSection(i) > 0 {
        lastSectionWithItems = i
      }
    }

    if experimentDataSource.numberOfItemsInSection(section) == 0 {
      // If the section is empty, no insets.
      return .zero
    } else if section == lastSectionWithItems {
      // If this is the last section with items, include the bottom inset.
      return cellInsets
    } else {
      // If this is not the last section with items section, but this section has items,
      // use standard insets without bottom. This avoids an issue where two stacked
      // sections can have double padding.
      var modifiedInsets = cellInsets
      modifiedInsets.bottom = 0
      return modifiedInsets
    }
  }

  func collectionView(_ collectionView: UICollectionView,
