def METHOD_NAME():
    """
    Get the number of ranks.
    Returns
    -------
    size : int
        The number of ranks.
    """
    if use_horovod:
        return hvd.size()
    if use_mpi:
        return comm.Get_size()