code: def CategoryBlock(
      vocab: MutableSequence
      | pd.Series = None,  # List of unique class names
      sort: bool = True,  # Sort the classes alphabetically
      add_na: bool = False,  # Add `#na#` to `vocab`
  ):
      "`TransformBlock` for single-label categorical targets"
      return TransformBlock(
          type_tfms=Categorize(vocab=vocab, sort=sort, add_na=add_na)
      )
  
imports: from __future__ import annotations
  from ..torch_basics import *
  from .core import *
  from .load import *
  from .external import *
  from .transforms import *
  from inspect import isfunction, ismethod
  from .load import _collate_types
label_desc: Use image node_id 1 for calling a global function with example usage: CategoryBlock(vocab, sort, add_na) and returns: TransformBlock