@classmethod
def _set_calc_checksum_backend(cls, func):
    """
        helper used by subclasses to validate & set backend-specific
        calc checksum helper.
        """
    backend = cls._pending_backend
    assert backend, 'should only be called during set_backend()'
    if not callable(func):
        raise RuntimeError('%s: backend %r returned invalid callable: %r' %
            (cls.name, backend, func))
    if not cls._pending_dry_run:
        cls._calc_checksum_backend = func
