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: expander.rb
    path of file: ./repos/karafka/lib/karafka/pro/iterator
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

# This Karafka component is a Pro component under a commercial license.
# This Karafka component is NOT l
    
        def call(topics)
          expanded = Hash.new { |h, k| h[k] = {} }

          normalize_format(topics).map do |topic, details|
            if details.is_a?(Hash)
              details.each do |partition, offset|
                expanded[topic][partition] = offset
              end
            else
              partition_count(topic).times do |partition|
                # If no offsets are provided, we just start from zero
                expanded[topic][partition] = details || 0
              end
            end
          end