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: newrelic_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 NewrelicPlugin < Base
      def on_container_instance_user_data(_instance, user_data)
        user_data.add_file("/etc/newrelic-infra.yml", "root:root", "644", <<~EOS)
          license_key: #{attributes["license_key"]}
          custom_attributes:
            role: barcelona-ci
            district: #{district.name}
        EOS

        user_data.add_file("/etc/yum.repos.d/newrelic-infra.repo", "root:root", "644", <<~EOS)
          [newrelic-infra]
          name=New Relic Infrastructure
          baseurl=https://download.newrelic.com/infrastructure_agent/linux/yum/el/7/x86_64
          gpgkey=https://download.newrelic.com/infrastructure_agent/gpg/newrelic-infra.gpg
          gpgcheck=1
         
    
      def on_container_instance_user_data(_instance, user_data)
        user_data.add_file("/etc/newrelic-infra.yml", "root:root", "644", <<~EOS)
          license_key: #{attributes["license_key"]}
          custom_attributes:
            role: barcelona-ci
            district: #{district.name}
        EOS

        user_data.add_file("/etc/yum.repos.d/newrelic-infra.repo", "root:root", "644", <<~EOS)
          [newrelic-infra]
          name=New Relic Infrastructure
          baseurl=https://download.newrelic.com/infrastructure_agent/linux/yum/el/7/x86_64
          gpgkey=https://download.newrelic.com/infrastructure_agent/gpg/newrelic-infra.gpg
          gpgcheck=1
          repo_gpgcheck=1
        EOS

        user_data.run_commands += [
          "yum -q makecache -y --disablerepo='*' --enablerepo='newrelic-infra'",
          "yum install newrelic-infra -y"
        ]

        user_data
      end