  A graph $G$ is said to be an $(s, k)$-polar graph if its vertex set admits a
partition $(A, B)$ such that $A$ and $B$ induce, respectively, a complete
$s$-partite graph and the disjoint union of at most $k$ complete graphs. Polar
graphs and monopolar graphs are defined as $(\infty, \infty)$- and $(1,
\infty)$-polar graphs, respectively, and unipolar graphs are those graphs with
a polar partition $(A, B)$ such that $A$ is a clique.
  The problems of deciding whether an arbitrary graph is a polar graph or a
monopolar graph are known to be NP-complete. In contrast, deciding whether a
graph is a unipolar graph can be done in polynomial time. In this work we prove
that the three previous problems can be solved in linear time on the classes of
$P_4$-sparse and $P_4$-extendible graphs, generalizing analogous results
previously known for cographs.
  Additionally, we provide finite forbidden subgraph characterizations for
$(2,2)$-polar graphs on $P_4$-sparse and $P_4$-extendible graphs, also
generalizing analogous results recently obtained for the class of cographs.
