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

require "digest/md5"

class AppUser < ApplicationReco
    
  def register_in_crm
    crm_tags = app.app_packages.tagged_with("crm").pluck(:id)
    integrations = app.app_package_integrations.includes(:app_package)
                      .where(app_package: crm_tags)

    integrations.each do |_integration|
      profile = external_profiles.find_or_create_by(
        provider: pkg.name.downcase
      )
      profile.sync
    end
  end