I have a directed graph, eg:
$$A\to B\to C$$
$A$ and $C$ may have multiple in- and out-edges, but B has exactly one in- and one out-edge.
I want to remove node $B$ and replace the edges $(A,B)$ and $(B,C)$ with a single edge $(A,C)$.
Is there a name for this operation? In particular a name or algorithm for finding all nodes such as $B$ and removing them from the graph.