code: def filter_custom_store(
      feature_store: FeatureStore,
      graph_store: GraphStore,
      node: Tensor,
      row: Tensor,
      col: Tensor,
      edge: OptTensor,
      custom_cls: Optional[Data] = None,
  ) -> Data:
      r"""Constructs a :class:`~torch_geometric.data.Data` object from a feature
      store and graph store instance.
      """
      # Construct a new `Data` object:
      data = custom_cls() if custom_cls is not None else Data()
  
      data.edge_index = torch.stack([row, col], dim=0)
  
      # Filter node storage:
      required_attrs = []
      for attr in feature_store.get_all_tensor_attrs():
          attr.index = node  # TODO Support edge features.
          required_attrs.append(attr)
          data.num_nodes = attr.index.size(0)
  
      # NOTE Here, we utilize `feature_store.multi_get` to give the feature store
      # full control over optimizing how it returns features (since the call is
      # synchronous, this amounts to giving the feature store control over all
      # iteration).
      tensors = feature_store.multi_get_tensor(required_attrs)
      for i, attr in enumerate(required_attrs):
          data[attr.attr_name] = tensors[i]
  
      return data
  
imports: import copy
  import logging
  import math
  from typing import Any, Dict, Optional, Tuple, Union
  import numpy
  import torch
  from torch import Tensor
  import torch_geometric.typing
  from torch_geometric import EdgeIndex
  from torch_geometric.data import Data, FeatureStore, GraphStore, HeteroData, TensorAttr, remote_backend_utils
  from torch_geometric.data.storage import EdgeStorage, NodeStorage
  from torch_geometric.typing import EdgeType, FeatureTensorType, InputEdges, InputNodes, NodeType, OptTensor, SparseTensor, TensorFrame
label_desc: Use image node_id 6 for calling a global function with example usage: filter_custom_store(feature_store, graph_store, node, row, col, edge, custom_cls) and returns: data