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: mock_user.rb
    path of file: ./repos/warden-github-rails/lib/warden/github/rails/test_helpers
    
    the code of the file until where you have to start completion: module Warden
  module GitHub
    module Rails
      module TestHelpers
        class MockUser < User
          def initialize(*args)
            super
            @memberships = { team: [], org: [] }
          end

          # Prevent the stubbed memberships from being overwritten b
    
          def memberships=(val) end

          def stub_membership(args)
            args.each do |type, values|
              values = Array(values)
              values.map!(&:to_i) if type == :team
              memberships.fetch(type).concat(values)
            end
          end

          def team_member?(id)
            memberships[:team].include?(id)
          end

          def organization_member?(id)
            memberships[:org].include?(id)
          end

          def marshal_dump
            [memberships, super]
          end

          def marshal_load(data)
            memberships, super_data = data
            @memberships = memberships.symbolize_keys
            super(super_data)
          end
        end