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: multiple_expectations.rb
    path of file: ./repos/rubocop-rspec/lib/rubocop/cop/rspec
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module RuboCop
  module Cop
    module RSpec
      # Checks if examples contain too m
    
        def on_block(node) # rubocop:disable InternalAffairs/NumblockHandler
          return unless example?(node)

          return if example_with_aggregate_failures?(node)

          expectations_count = to_enum(:find_expectation, node).count

          return if expectations_count <= max_expectations

          self.max = expectations_count

          flag_example(node, expectation_count: expectations_count)
        end