def clone_class(
    origin_class: type,
    omit_names: Iterable[str] | None = None,
    fallback: Callable[[Any], Any] | None = None,
) -> Callable[[type], type]:
    """Copy attributes from one class to another

    Method types are wrapped with a decorator to report API calls. All
    other values are copied as-is.

    """

    class_name = f"{origin_class.__module__}.{origin_class.__name__}"
    clean_omit_names = OrderedSet() if omit_names is None else omit_names

    def _clone_class(cls: type) -> type:
        missing = filter_namespace(
            origin_class.__dict__,
            omit_names=set(cls.__dict__).union(clean_omit_names),
        )

        reporting = settings.report_coverage()

        for attr, value in cls.__dict__.items():
            # Only need to wrap things that are also in the origin class
            if not hasattr(origin_class, attr):
                continue
            if should_wrap(value):
                wrapped = implemented(
                    value,
                    class_name,
                    attr,
                    reporting=reporting,
                )
                setattr(cls, attr, wrapped)

        for attr, value in missing.items():
            if should_wrap(value):
                wrapped = unimplemented(
                    value,
                    class_name,
                    attr,
                    reporting=reporting,
                    fallback=fallback,
                )
                setattr(cls, attr, wrapped)
            else:
                setattr(cls, attr, value)

        return cls

    return _clone_class
Copy attributes from one class to another

    Method types are wrapped with a decorator to report API calls. All
    other values are copied as-is.

    
cupynumeric/_utils/coverage.py