code: def test_sparse_opt():
      os.environ["DGL_DIST_MODE"] = "distributed"
      check_sparse_adam(1, True)
      check_sparse_adam(1, False)
  
imports: import os
  import multiprocessing
  import pickle
  import random
  import socket
  import sys
  import time
  import unittest
  import backend
  import dgl
  import numpy
  import torch
  from dgl import function
  from dgl.distributed import DistEmbedding, DistGraph, DistGraphServer, load_partition_book, partition_graph
  from dgl.distributed.optim import SparseAdagrad, SparseAdam
  from scipy import sparse
label_desc: Use image node_id 8 for calling a global function with example usage: test_sparse_opt() without return types