class_docstr: The ``GraphEmbedder`` is a :class:`~flash.Task` for obtaining feature vectors (embeddings) from graphs. For more
  details, see :ref:`graph_embedder`.
  
  Args:
      backbone: A model to use to extract image features.
      pooling_fn: The global pooling operation to use (one of: "max", "max", "add" or a callable).
code: def __init__(
      self,
      backbone: nn.Module,
      pooling_fn: Optional[Union[str, Callable]] = "mean",
  ):
      super().__init__(model=None)
  
      # Don't save backbone or pooling_fn if it is not a string
      self.save_hyperparameters(
          ignore=["backbone"]
          if isinstance(pooling_fn, str)
          else ["backbone", "pooling_fn"]
      )
  
      self.backbone = backbone
  
      self.pooling_fn = (
          POOLING_FUNCTIONS[pooling_fn]
          if isinstance(pooling_fn, str)
          else pooling_fn
      )
  
      self.collate_fn = _pyg_collate
  
file_path: lightning-flash/src/flash/graph/embedding/model.py
imports: from typing import IO, Any, Callable, Dict, Optional, Union
  import torch
  from torch import Tensor, nn
  from flash.core.data.io.input import DataKeys
  from flash.core.model import Task
  from flash.graph.classification.model import POOLING_FUNCTIONS, GraphClassifier
  from flash.graph.collate import _pyg_collate
label_desc: Use image node_id 1 to create a new GraphEmbedder object from inherited base classes: Task with example: obj = GraphEmbedder(backbone, pooling_fn)