code: def delegate_names(delegate, accessors, typ, overwrite=False):
      """
      Add delegated names to a class using a class decorator.  This provides
      an alternative usage to directly calling `_add_delegate_accessors`
      below a class definition.
  
      Parameters
      ----------
      delegate : object
          the class to get methods/properties & doc-strings
      acccessors : Sequence[str]
          List of accessor to add
      typ : {'property', 'method'}
      overwrite : boolean, default False
         overwrite the method/property in the target class if it exists
  
      Returns
      -------
      callable
          A class decorator.
  
      Examples
      --------
      @delegate_names(Categorical, ["categories", "ordered"], "property")
      class CategoricalAccessor(PandasDelegate):
          [...]
      """
  
      def add_delegate_accessors(cls):
          cls._add_delegate_accessors(
              delegate, accessors, typ, overwrite=overwrite
          )
          return cls
  
      return add_delegate_accessors
  
imports: import warnings
  from pandas.util._decorators import Appender
label_desc: Use image node_id 1 for calling a global function with example usage: delegate_names(delegate, accessors, typ, overwrite) and returns: add_delegate_accessors, cls