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: scope.rb
    path of file: ./repos/activegraph/lib/active_graph/node
    
    the code of the file until where you have to start completion: module ActiveGraph::Node
  module Scope
    extend ActiveSupport::Concern

    included do
      thread_mattr_accessor :current_scope
    end

    module ClassMethods
      # Similar to ActiveRecord scope
      #
      # @example without argument
      #   class Person
      #     include ActiveGraph::Node
      #     property :name
      #     property :score
      #     has_many :out, :friends, type: :has_friend, model_class: s
    
      def scope(name, proc)
        scopes[name.to_sym] = proc

        klass = class << self; self; end
        klass.instance_eval do
          define_method(name) do |*query_params, **kwargs|
            eval_context = ScopeEvalContext.new(self, current_scope || self.query_proxy)
            proc = full_scopes[name.to_sym]
            _call_scope_context(eval_context, *query_params, **kwargs, &proc)
          end
        end

        define_method(name) do |*query_params, **kwargs|
          as(:n).public_send(name, *query_params, **kwargs)
        end
      end