class_docstr: Abstract filesystem interface.
docstr: Compute bytes used by all contents under indicated path in file tree.
  
  Parameters
  ----------
  path : str
      Can be a file path or directory.
  
  Returns
  -------
  usage : int
docstr_tok: ["Compute","bytes","used","by","all","contents","under","indicated","path","in","file","tree",".","Parameters","--","--","--","--","--","path",":","str","Can","be","a","file","path","or","directory",".","Returns","--","--","--","-","usage",":","int"]
code: def disk_usage(self, path):
      """
      Compute bytes used by all contents under indicated path in file tree.
  
      Parameters
      ----------
      path : str
          Can be a file path or directory.
  
      Returns
      -------
      usage : int
      """
      path = _stringify_path(path)
      path_info = self.stat(path)
      if path_info["kind"] == "file":
          return path_info["size"]
  
      total = 0
      for root, directories, files in self.walk(path):
          for child_path in files:
              abspath = self._path_join(root, child_path)
              total += self.stat(abspath)["size"]
  
      return total
  
imports: import os
  import posixpath
  import sys
  import urllib.parse
  import warnings
  from os.path import join
  import pyarrow
  from pyarrow.util import doc, _stringify_path, _is_path_like, _DEPR_MSG
label_desc: Use image node_id 4 for calling the FileSystem obj's underlying member method code with example usage: obj.disk_usage(path) and returns: total, path_info