code: def classifier_3d(
      input_: Tensor,
      weight: Tensor,
      bias: Optional[Tensor],
      input_parallel_mode: ParallelMode,
      weight_parallel_mode: ParallelMode,
      output_parallel_mode: ParallelMode,
  ) -> Tensor:
      r"""3D parallel classifier.
  
      Args:
          input_ (:class:`torch.tensor`): input matrix.
          weight (:class:`torch.tensor`): matrix of weight.
          bias (:class:`torch.tensor`): matrix of bias.
          input_parallel_mode (:class:`colossalai.legacy.context.parallel_mode.ParallelMode`): input parallel mode.
          weight_parallel_mode (:class:`colossalai.legacy.context.parallel_mode.ParallelMode`): weight parallel mode.
          output_parallel_mode (:class:`colossalai.legacy.context.parallel_mode.ParallelMode`): output parallel mode.
  
      Note:
          The parallel_mode should be concluded in ``ParallelMode``. More details about ``ParallelMode`` could be found
          in `parallel_mode <https://github.com/hpcaitech/ColossalAI/blob/main/colossalai/context/parallel_mode.py>`_
      """
      return _Classifier3D.apply(
          input_,
          weight,
          bias,
          id(weight),
          id(bias) if bias is not None else None,
          input_parallel_mode,
          weight_parallel_mode,
          output_parallel_mode,
      )
  
imports: from typing import Optional, Tuple
  import torch
  from torch import Tensor
  from torch.cuda.amp import custom_bwd, custom_fwd
  from colossalai.legacy.communication import all_gather, all_reduce, broadcast, reduce, reduce_scatter
  from colossalai.legacy.constants import INPUT_GROUP_3D, WEIGHT_GROUP_3D
  from colossalai.legacy.context.parallel_mode import ParallelMode
  from colossalai.legacy.core import global_context
  from ._utils import get_parallel_mode_from_env, push_async_grad
label_desc: Use image node_id 2 for calling a global function with example usage: classifier_3d(input_, weight, bias, input_parallel_mode, weight_parallel_mode, output_parallel_mode) and returns: _Classifier3D