def _get_num_workers(self):
    try:
        import horovod.mxnet as hvd
        if hvd.size():
            return hvd.size()
    except (ModuleNotFoundError, ValueError, ImportError):
        pass
    return 1
def _get_num_workers(self):
    try:
        import horovod.mxnet as hvd
        if hvd.size():
            return hvd.size()
    except (ModuleNotFoundError, ValueError, ImportError):
        pass
    return 1