<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def bind(cls, origin, handler, *, name=None):
 """Bind this object to the given origin and handler. :param origin: An instance of `Origin`. :param handler: An instance of `bones.HandlerAPI`. :return: A subclass of this class. """

        name = cls.__name__ if name is None else name
        attrs = {
            "_origin": origin, "_handler": handler,
            "__module__": "origin",  # Could do better?
        }
        return type(name, (cls,), attrs)