def delegate_names(delegate, accessors, typ, overwrite=False):
def add_delegate_accessors(cls):<EOL><INDENT>cls._add_delegate_accessors(delegate, accessors, typ,<EOL>overwrite=overwrite)<EOL>return cls<EOL><DEDENT>return add_delegate_accessors<EOL>
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
accessors : 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):
    [...]