def build_coder_maps(conn_or_maps, registry: nil)
if conn_or_maps.is_a?(PG::BasicTypeRegistry::CoderMapsBundle)
raise ArgumentError, "registry argument must be given to CoderMapsBundle" if registry
conn_or_maps
else
PG::BasicTypeRegistry::CoderMapsBundle.new(conn_or_maps, registry: registry).freeze
end
end