code: def _verify_partition_formats(part_g, formats):
      # verify saved graph formats
      if formats is None:
          assert "coo" in part_g.formats()["created"]
      else:
          for format in formats:
              assert format in part_g.formats()["created"]
  
imports: import json
  import os
  import tempfile
  import backend
  import dgl
  import numpy
  import pytest
  import torch
  from dgl import function
  from dgl.distributed import convert_dgl_partition_to_csc_sampling_graph, load_partition, load_partition_book, load_partition_feats, partition_graph
  from dgl.distributed.graph_partition_book import _etype_str_to_tuple, _etype_tuple_to_str, DEFAULT_ETYPE, DEFAULT_NTYPE, EdgePartitionPolicy, HeteroDataName, NodePartitionPolicy, RangePartitionBook
  from dgl.distributed.partition import _get_inner_edge_mask, _get_inner_node_mask, RESERVED_FIELD_DTYPE
  from scipy import sparse
  from utils import reset_envs
label_desc: Use image node_id 2 for calling a global function with example usage: _verify_partition_formats(part_g, formats) without return types