code: def build_tokenizer(opts, *args, **kwargs) -> BaseTokenizer:
      """Helper function to build the text tokenizer from command-line arguments.
  
      Args:
          opts: Command-line arguments
  
      Returns:
          Image projection head module.
      """
      tokenizer_name = getattr(opts, "text_tokenizer.name", None)
  
      # We registered the base class using a special `name` (i.e., `__base__`)
      # in order to access the arguments defined inside those classes. However, these classes are not supposed to
      # be used. Therefore, we raise an error for such cases
      if tokenizer_name == "__base__":
          logger.error(
              "__base__ can't be used as a projection name. Please check."
          )
  
      tokenizer = TOKENIZER_REGISTRY[tokenizer_name](
          opts, *args, **kwargs
      )
      return tokenizer
  
imports: import argparse
  from data.text_tokenizer.base_tokenizer import BaseTokenizer
  from utils import logger
  from utils.registry import Registry
label_desc: Use image node_id 2 for calling a global function with example usage: build_tokenizer(opts) and returns: tokenizer