code: def main(
      path_to_info=None,
      *,
      by="networkx_path",
      networkx_path=False,
      dispatch_name=False,
      version_added=False,
      plc=False,
      dispatch_name_if_different=True,
      incomplete=False,
      different=False,
      file=sys.stdout,
  ):
      if path_to_info is None:
          path_to_info = get_path_to_info(version_added_sep="-")
      kwargs = {
          "networkx_path": networkx_path,
          "dispatch_name": dispatch_name,
          "version_added": version_added,
          "plc": plc,
          "dispatch_name_if_different": dispatch_name_if_different,
          "incomplete": incomplete,
          "different": different,
      }
      if by == "networkx_path":
          G = create_tree(path_to_info, by="networkx_path", **kwargs)
          text = re.sub(
              r"[A-Za-z_\./]+\.",
              "",
              ("\n".join(nx.generate_network_text(G))),
          )
      elif by == "plc":
          G = create_tree(
              path_to_info,
              by=["plc", "networkx_path"],
              prefix="plc-",
              **kwargs,
          )
          text = re.sub(
              "plc-",
              "plc.",
              re.sub(
                  r" plc-[A-Za-z_\./]*\.",
                  " ",
                  "\n".join(nx.generate_network_text(G)),
              ),
          )
      elif by == "version_added":
          G = create_tree(
              path_to_info,
              by=["version_added", "networkx_path"],
              prefix="version_added-",
              **kwargs,
          )
          text = re.sub(
              "version_added-",
              "version: ",
              re.sub(
                  r" version_added-[-0-9A-Za-z_\./]*\.",
                  " ",
                  "\n".join(nx.generate_network_text(G)),
              ),
          ).replace("-", ".")
      else:
          raise ValueError(
              "`by` argument should be one of {'networkx_path', 'plc', 'version_added' "
              f"got: {by}"
          )
      print(text, file=file)
      return text
  
file_path: cugraph/python/nx-cugraph/nx_cugraph/scripts/print_tree.py
imports: import argparse
  import re
  import sys
  import networkx
  from nx_cugraph.scripts.print_table import get_path_to_info
label_desc: Use image node_id 4 for calling a global function with example usage: main(path_to_info) and returns: text