code: def test_graph_serialize_with_restricted_formats():
      g = dgl.rand_graph(100, 200)
      g = g.formats(["coo"])
      g_list = [g]
  
      # create a temporary file and immediately release it so DGL can open it.
      f = tempfile.NamedTemporaryFile(delete=False)
      path = f.name
      f.close()
  
      expect_except = False
      try:
          dgl.save_graphs(path, g_list, formats=["csr"])
      except:
          expect_except = True
      assert expect_except
  
      os.unlink(path)
  
imports: import os
  import tempfile
  import time
  import unittest
  import warnings
  import backend
  import dgl
  import dgl.ndarray
  import numpy
  import pytest
  import scipy
  from dgl.data.utils import load_labels, load_tensors, save_tensors
label_desc: Use image node_id 18 for calling a global function with example usage: test_graph_serialize_with_restricted_formats() without return types