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: node_type.rb
    path of file: ./repos/leftovers/lib/leftovers/matcher_builders
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require 'set'

module Leftovers
  module MatcherBuilders
    module NodeType
      def self.build(types_pattern) # rubocop:disable Metrics
        Or.each_or_self(types_pattern) do |type|
          case type
          when :Symbol then Matchers::NodeType.new(:sym)
          when :String then Matchers::NodeType.new(:str)
          when :Integer then Matchers::NodeType.new(:int)
          when :Float then Matchers::NodeType.new(:float)
          when :Array then Matchers::NodeType.new(:array)
          when :Hash then Matchers::NodeType.new(:hash
    
      def self.build(types_pattern) # rubocop:disable Metrics
        Or.each_or_self(types_pattern) do |type|
          case type
          when :Symbol then Matchers::NodeType.new(:sym)
          when :String then Matchers::NodeType.new(:str)
          when :Integer then Matchers::NodeType.new(:int)
          when :Float then Matchers::NodeType.new(:float)
          when :Array then Matchers::NodeType.new(:array)
          when :Hash then Matchers::NodeType.new(:hash)
          when :Proc then Matchers::NodeIsProc
          when :Method
            Matchers::NodeType.new(
              ::Set[:send, :csend, :def, :defs].compare_by_identity.freeze
            )
          when :Constant
            Matchers::NodeType.new(
              ::Set[:const, :class, :module, :casgn].compare_by_identity.freeze
            )
          # :nocov:
          else raise UnexpectedCase, "Unhandled value #{type.inspect}"
            # :nocov:
          end
        end