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: entities.rb
    path of file: ./repos/oga/lib/oga/xml
    
    the code of the file until where you have to start completion: module Oga
  module XML
    # Module for encoding/decod
    
      def self.decode(input, mapping = DECODE_MAPPING)
        return input unless input.include?(AMPERSAND)

        input = input.gsub(REGULAR_ENTITY, mapping)

        if input.include?(AMPERSAND)
          input = input.gsub(NUMERIC_CODE_POINT_ENTITY) do |found|
            pack_string($1, 10) || found
          end
        end