code: def text_similarity(presets: str = DEFAULT):
      """
      Register the presets for text_similarity.
  
      Parameters
      ----------
      presets
          The preset name.
  
      Returns
      -------
      hyperparameters
          The hyperparameters for a given preset.
      hyperparameter_tune_kwargs
          The hyperparameter tuning kwargs.
      """
      hyperparameters = {
          "model.names": ["hf_text"],
          "model.hf_text.pooling_mode": "mean",
          "data.categorical.convert_to_text": True,
          "data.numerical.convert_to_text": True,
      }
      hyperparameter_tune_kwargs = {}
  
      presets, use_hpo = parse_presets_str(presets)
      if use_hpo:
          (
              default_tunable_hyperparameters,
              default_hyperparameter_tune_kwargs,
          ) = get_default_hpo_setup()
          hyperparameters.update(default_tunable_hyperparameters)
          hyperparameter_tune_kwargs.update(
              default_hyperparameter_tune_kwargs
          )
  
      if presets in [DEFAULT, HIGH_QUALITY]:
          hyperparameters.update(
              {
                  "model.hf_text.checkpoint_name": "sentence-transformers/all-MiniLM-L12-v2",
              }
          )
      elif presets == MEDIUM_QUALITY:
          hyperparameters.update(
              {
                  "model.hf_text.checkpoint_name": "sentence-transformers/all-MiniLM-L6-v2",
              }
          )
      elif presets == BEST_QUALITY:
          hyperparameters.update(
              {
                  "model.hf_text.checkpoint_name": "sentence-transformers/all-mpnet-base-v2",
              }
          )
      else:
          raise ValueError(f"Unknown preset type: {presets}")
  
      return hyperparameters, hyperparameter_tune_kwargs
  
imports: from typing import List, Optional
  from autogluon.common.utils.try_import import try_import_ray
  from .constants import BEST_QUALITY, BINARY, DATA, DEFAULT, ENVIRONMENT, HIGH_QUALITY, MEDIUM_QUALITY, MODEL, MULTICLASS, OPTIMIZATION, REGRESSION
  from .registry import Registry
label_desc: Use image node_id 13 for calling a global function with example usage: text_similarity(presets) and returns: hyperparameters,  hyperparameter_tune_kwargs