class_docstr: Represent a single graph with additional attributes.
class_docstr_tok: ["Represent","a","single","graph","with","additional","attributes","."]
docstr: Build a clone from a source GraphData
code: def from_graphdata(self, src: Any):
      """Build a clone from a source GraphData"""
  
      # Add nodes and edges
      self.add_nodes(src.get_node_num())
      self.add_edges(src._edge_indices.src, src._edge_indices.tgt)
  
      # Deepcopy of feature tensors
      for k, v in src._node_features.items():
          self._node_features[k] = v
      for k, v in src._edge_features.items():
          self._edge_features[k] = v
  
      # Copy attributes
      import copy
  
      self._node_attributes = copy.deepcopy(src.node_attributes)
      self._edge_attributes = copy.deepcopy(src.edge_attributes)
      self.graph_attributes = copy.deepcopy(src.graph_attributes)
  
      # Copy batch information if necessary
      if src._is_batch:
          self.copy_batch_info(src)
  
      # Move data to the device of the source graph
      self.to(src.device)
  
imports: import os
  import warnings
  from collections import namedtuple
  from typing import Any, Callable, Dict, List, Tuple, Union
  import dgl
  import scipy.sparse
  import torch
  from torch.nn.utils.rnn import pad_sequence
  from .utils import EdgeNotFoundException, SizeMismatchException, check_and_expand, entail_zero_padding, int_to_list, slice_to_list
  from .views import BatchEdgeFeatView, BatchNodeFeatView, EdgeView, NodeFeatView, NodeView
label_desc: Use image node_id 30 for calling the GraphData obj's underlying member method code with example usage: obj.from_graphdata(src) without return types