code: def _sampled_subgraph_str(
      sampled_subgraph: SampledSubgraph, classname
  ) -> str:
      final_str = classname + "("
  
      attributes = get_attributes(sampled_subgraph)
      attributes.reverse()
  
      for name in attributes:
          val = getattr(sampled_subgraph, name)
  
          def _add_indent(_str, indent):
              lines = _str.split("\n")
              lines = [lines[0]] + [
                  " " * indent + line for line in lines[1:]
              ]
              return "\n".join(lines)
  
          val = str(val)
          final_str = (
              final_str
              + f"{name}={_add_indent(val, len(name) + len(classname) + 1)},\n"
              + " " * len(classname)
          )
      return final_str[: -len(classname)] + ")"
  
file_path: dgl/python/dgl/graphbolt/impl/sampled_subgraph_impl.py
imports: from dataclasses import dataclass
  from typing import Dict, Union
  import torch
  from ..base import CSCFormatBase, etype_str_to_tuple
  from ..internal import get_attributes
  from ..sampled_subgraph import SampledSubgraph
label_desc: Use image node_id 1 for calling a global function with example usage: _sampled_subgraph_str(sampled_subgraph, classname) and returns: unknown, str