code: def write_graph_dgl(graph_file, graph_obj, formats, sort_etypes):
      """
      Utility function to serialize graph dgl objects
  
      Parameters:
      -----------
      graph_obj : dgl graph object
          graph dgl object, as created in convert_partition.py, which is to be serialized
      graph_file : string
          File name in which graph object is serialized
      formats : str or list[str]
          Save graph in specified formats.
      sort_etypes : bool
          Whether to sort etypes in csc/csr.
      """
      dgl.distributed.partition._save_graphs(
          graph_file, [graph_obj], formats, sort_etypes
      )
  
imports: import json
  import logging
  import os
  from itertools import cycle
  import constants
  import dgl
  import numpy
  import psutil
  import pyarrow
  import torch
  from dgl.distributed.partition import _dump_part_config
  from pyarrow import csv
label_desc: Use image node_id 16 for calling a global function with example usage: write_graph_dgl(graph_file, graph_obj, formats, sort_etypes) without return types