code: def create_rewriter(
      rewriter_type: str, *args, **kwargs
  ) -> rewriter.BaseRewriter:
      """Instantiates a new rewriter with the given type and constructor arguments.
  
      Args:
        rewriter_type: The rewriter subclass to instantiate (can be all lowercase).
        *args: Positional initialization arguments to pass to the rewriter.
        **kwargs: Keyward initialization arguments to pass to the rewriter.
  
      Returns:
        The instantiated rewriter.
      Raises:
        ValueError: If unable to instantiate the rewriter.
      """
      return _RewriterFactory.get_rewriter_cls(rewriter_type)(
          *args, **kwargs
      )
  
file_path: tfx/tfx/components/trainer/rewriting/rewriter_factory.py
imports: import importlib
  from tfx.components.trainer.rewriting import rewriter
label_desc: Use image node_id 3 for calling a global function with example usage: create_rewriter(rewriter_type) and returns: _RewriterFactory