  Based on the fact that the near horizon geometry of the extremal
Schwarzschild-de Sitter black holes is Nariai geometry, we define the black
holes of Nariai class as the configuration whose near-horizon geometry is
factorized as two dimensional de Sitter space-time and some compact topology,
that is Nariai geometry. We extend the entropy function formalism to the case
of the black holes of Nariai class. The conventional entropy function (for the
extremal black holes) is defined as Legendre transformation of Lagrangian
density, thus the `Routhian density', over two dimensional anti-de Sitter. As
for the black holes of Nariai class, it is defined as {\em minus} `Routhian
density' over two dimensional de Sitter space-time. We found an exact agreement
of the result with Bekenstein-Hawking entropy. The higher order corrections are
nontrivial only when the space-time dimension is over four, that is, $d>4$.
There is a subtlety as regards the temperature of the black holes of Nariai
class. We show that in order to be consistent with the near horizon geometry,
the temperature should be non-vanishing despite the extremality of the black
holes.
