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: parsed_shot.rb
    path of file: ./repos/visualizer/app/models/shot_chart
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

class ShotChart::
    
  def stages_from_state_change
    indices = []
    current = data["espresso_state_change"].find { |s| !s.to_i.zero? }
    data["espresso_state_change"].each.with_index do |s, i|
      next if s.to_i.zero? || s == current

      indices << i
      current = s
    end
    indices
  end