You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: simple_package_versions_presenter.rb
    path of file: ./repos/gitlabhq/app/presenters/packages/pypi
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

# Display package version data acording to PyPI
# Simple API: https://warehouse.pypa.io/api-reference/legacy/#simple-project-api
# Generates the HTML body for PyPI simple API.
# Basically a list of package download links for a specific
# package
module Packages
  module Pypi
    class SimplePackageVersionsPresenter < SimplePresenterBase
      private

      def links
        refs = []

        available_packages.each_batch do |relation|
          batch = relation.
    
      def build_pypi_package_file_path(file)
        params = {
          id: @project_or_group.id,
          sha256: file.file_sha256,
          file_identifier: file.file_name
        }

        if project?
          expose_url(
            api_v4_projects_packages_pypi_files_file_identifier_path(
              params, true
            )
          ) + "#sha256=#{file.file_sha256}"
        elsif group?
          expose_url(
            api_v4_groups___packages_pypi_files_file_identifier_path(
              params, true
            )
          ) + "#sha256=#{file.file_sha256}"
        end