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: datadog_plugin.rb
    path of file: ./repos/barcelona/lib/barcelona/plugins
    
    the code of the file until where you have to start completion: module Barcelona
  module Plugins
    class DatadogPlugin < Base
      # This plugin must be the last of the instalation order
      # Usage sample: 
      # 
    
      def on_network_stack_template(_stack, template)
        bastion_lc = template["BastionLaunchConfiguration"]
        return template if bastion_lc.nil?

        user_data = InstanceUserData.load_or_initialize(bastion_lc["Properties"]["UserData"])
        add_files!(user_data, has_docker: false)
        user_data.run_commands += [
          agent_command(has_docker: false)
        ]
        bastion_lc["Properties"]["UserData"] = user_data.build
        template
      end