def get_backend() -> Optional[str]:
    """Returns the backend for distributed training."""
    if _is_xla_distributed_initialized():
        return "xla"
    elif _is_torch_distributed_initialized():
        return "ddp"
    else:
        return None
Returns the backend for distributed training.
catalyst/utils/distributed.py