code: def _register_accessor(name, cls):
      def decorator(accessor):
          if hasattr(cls, name):
              msg = f"Attribute {name} will be overridden in {cls.__name__}"
              warnings.warn(msg)
          cached_accessor = CachedAccessor(name, accessor)
          cls._accessors.add(name)
          setattr(cls, name, cached_accessor)
  
          return accessor
  
      return decorator
  
imports: import warnings
  from pandas.core.accessor import CachedAccessor
  import cudf
  from cudf.utils.docutils import docfmt_partial
label_desc: Use image node_id 1 for calling a global function with example usage: _register_accessor(name, cls) and returns: decorator, accessor