code: def _minibatch_str(minibatch: MiniBatch) -> str:
      final_str = ""
      # Get all attributes in the class except methods.
      attributes = get_attributes(minibatch)
      attributes.reverse()
      # Insert key with its value into the string.
      for name in attributes:
          val = getattr(minibatch, name)
  
          def _add_indent(_str, indent):
              lines = _str.split("\n")
              lines = [lines[0]] + [
                  " " * (indent + 10) + line for line in lines[1:]
              ]
              return "\n".join(lines)
  
          # Let the variables in the list occupy one line each, and adjust the
          # indentation on top of the original if the original data output has
          # line feeds.
          if isinstance(val, list):
              val = [str(val_str) for val_str in val]
              val = "[" + ",\n".join(val) + "]"
          elif isinstance(val, tuple):
              val = [str(val_str) for val_str in val]
              val = "(" + ",\n".join(val) + ")"
          else:
              val = str(val)
          final_str = (
              final_str
              + f"{name}={_add_indent(val, len(name)+1)},\n"
              + " " * 10
          )
      return "MiniBatch(" + final_str[:-3] + ")"
  
imports: from dataclasses import dataclass
  from typing import Dict, List, Tuple, Union
  import torch
  import dgl
  from dgl.utils import recursive_apply
  from .base import 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: _minibatch_str(minibatch) and returns: unknown, str