def action_factory(baseclass, name):
    """
    Factory for creating :class:`.Action` classes. This is simply
    a thin wrapper around ``type`` to dynamically create a subclass
    of the given ``baseclass`` with a different name.

    There are two use cases for using this:

    - Give re-usable action classes a better name.
    - Use the same :class:`.Action` subclass multiple times in the same
      :class:`.ActionGroup`.

    Both of these cases can also be solved with subclasses, and that
    is normally a better solution.

    Args:
        baseclass: The class to create a subclass of.
        name: The name of the subclass.
    """
    return type(name, (baseclass,), {})