class_docstr: A kind of ColoTensor to be considered as a module parameter.
class_docstr_tok: ["A","kind","of","ColoTensor","to","be","considered","as","a","module","parameter","."]
code: def __torch_function__(cls, func, types, args=..., kwargs=None):
      if kwargs is None:
          kwargs = {}
      if ColoParamOpHookManager.has_hook() and not is_no_hook_op(func):
          params = filter_colo_parameters(*args, **kwargs)
          if len(params) > 0:
              with torch._C.DisableTorchFunction():
                  new_args = ColoParamOpHookManager.pre_op(
                      params, *args, *kwargs.values()
                  )
              args, kwargs = replace_args(args, kwargs, new_args)
              ret = super().__torch_function__(
                  func, types, args, kwargs
              )
              with torch._C.DisableTorchFunction():
                  ret = ColoParamOpHookManager.post_op(params, ret)
              return _convert_output(ret, func)
      return super().__torch_function__(func, types, args, kwargs)
  
file_path: colossalai/colossalai/tensor/colo_parameter.py
imports: from typing import Optional
  import torch
  from colossalai.tensor.colo_tensor import ColoTensor
  from colossalai.tensor.param_op_hook import ColoParamOpHookManager
  from .colo_tensor import _convert_output
label_desc: Use image node_id 2 for calling the ColoParameter obj's underlying member method code with example usage: obj.__torch_function__(cls, func, types, args, kwargs) and returns: super, _convert_output