def to(  # pylint: disable=invalid-name
        self, device: torch.device, non_blocking=False
    ) -> None:
        """Copy `CSCFormatBase` to the specified device using reflection."""

        for attr in dir(self):
            # Only copy member variables.
            if not callable(getattr(self, attr)) and not attr.startswith("__"):
                setattr(
                    self,
                    attr,
                    recursive_apply(
                        getattr(self, attr),
                        apply_to,
                        device,
                        non_blocking=non_blocking,
                    ),
                )

        return self
Copy `CSCFormatBase` to the specified device using reflection.
python/dgl/graphbolt/base.py