code: def test_data_with_tensor_frame():
      tf = get_random_tensor_frame(num_rows=10)
      data = Data(tf=tf, edge_index=torch.randint(0, 10, size=(2, 20)))
  
      # Test basic attributes:
      assert data.is_node_attr("tf")
      assert data.num_nodes == tf.num_rows
      assert data.num_edges == 20
      assert data.num_node_features == tf.num_cols
  
      # Test subgraph:
      index = torch.tensor([1, 2, 3])
      sub_data = data.subgraph(index)
      assert sub_data.num_nodes == 3
      for key, value in sub_data.tf.feat_dict.items():
          assert torch.allclose(value, tf.feat_dict[key][index])
  
      mask = torch.tensor(
          [
              False,
              True,
              True,
              True,
              False,
              False,
              False,
              False,
              False,
              False,
          ]
      )
      data_sub = data.subgraph(mask)
      assert data_sub.num_nodes == 3
      for key, value in sub_data.tf.feat_dict.items():
          assert torch.allclose(value, tf.feat_dict[key][mask])
  
imports: import copy
  import pytest
  import torch
  import torch.multiprocessing
  import torch_geometric
  from torch_geometric.data import Data
  from torch_geometric.data.storage import AttrType
  from torch_geometric.testing import get_random_tensor_frame, withPackage
label_desc: Use image node_id 17 for calling a global function with example usage: test_data_with_tensor_frame() without return types