parameters: (data, metric, file=None, echo_dart=False)
docstring: Dumps data as a tree to stdout or file
docstring_summary: Dumps data as a tree to stdout or file
docstring_tokens: Dumps data as a tree to stdout or file
function: def dump_tree(data, metric, file=None, echo_dart=False):
      """Dumps data as a tree to stdout or file"""
      _files = dump_entity(
          data,
          lambda x: x.tree(
              _get_metric(x, metric),
              precision=tree_precision,
              expand_name=tree_expand_name,
          ),
          file,
          ".txt",
      )
      for itr in _files:
          if itr is not None and echo_dart is True:
              from timemory.common import dart_measurement_file
  
              dart_measurement_file(
                  os.path.basename(itr), itr, format="string", type="text"
              )
function_tokens: def dump_tree ( data , metric , file = None , echo_dart = False ) : _files = dump_entity ( data , lambda x : x . tree ( _get_metric ( x , metric ) , precision = tree_precision , expand_name = tree_expand_name , ) , file , ".txt" , ) for itr in _files : if itr is not None and echo_dart is True : from timemory . common import dart_measurement_file dart_measurement_file ( os . path . basename ( itr ) , itr , format = "string" , type = "text" )