def get(preference = {})
      return preference if PREFERENCES.values.include?(preference.class)
      Mongo::Lint.validate_underscore_read_preference(preference)
      PREFERENCES.fetch((preference[:mode] || :primary).to_sym).new(preference)
    end
def get(preference = {})
      return preference if PREFERENCES.values.include?(preference.class)
      Mongo::Lint.validate_underscore_read_preference(preference)
      PREFERENCES.fetch((preference[:mode] || :primary).to_sym).new(preference)
    end
Create a server selector object.

 @example Get a server selector object for selecting a secondary with
   specific tag sets.
   Mongo::ServerSelector.get(:mode => :secondary, :tag_sets => [{'dc' => 'nyc'}])

 @param [ Hash ] preference The server preference.

 @since 2.0.0