This function extracts the largest connected component or the giant component
of the input graph, which can be an "igraph" object or a "network" object, and converts
it to an "igraph" object. For bipartite graphs, this function can perform projection
before extracting the components.