code: def functional_transform(name: str) -> Callable:
      def wrapper(cls: Any) -> Any:
          @functional_datapipe(name)
          class DynamicMapper(IterDataPipe):
              def __init__(
                  self,
                  dp: IterDataPipe,
                  *args: Any,
                  **kwargs: Any,
              ) -> None:
                  super().__init__()
                  self.dp = dp
                  self.fn = cls(*args, **kwargs)
  
              def __iter__(self) -> Iterator:
                  for data in self.dp:
                      yield self.fn(copy.copy(data))
  
          return cls
  
      return wrapper
  
imports: import copy
  from typing import Any, Callable, Iterator, Optional, Sequence
  import torch
  from torch_geometric.data import Batch
  from torch_geometric.utils import from_smiles
label_desc: Use image node_id 1 for calling a global function with example usage: functional_transform(name) and returns: wrapper, cls