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: sharing.rb
    path of file: ./repos/onebody/app/models/concerns/person
    
    the code of the file until where you have to start completion: require 'active_support/concern'

module Concerns
  module Person
    module Sharing
      extend ActiveSupport::Concern

      included do
        scope :in_group_ids, ->(ids) { joins(:m
    
      def reason_sharing_with(person)
        ids = sharing_with_people_ids
        {}.tap do |reasons|
          reasons[:family] = person.family if ids[:family_ids].include?(person.id)
          reasons[:friend] = true if ids[:friend_ids].include?(person.id)
          reasons[:groups] = Group.find(ids[:groupy_ids].select { |id, _group_id| id == person.id }.map(&:last))
          reasons.delete(:groups) if reasons[:groups].empty?
        end
      end