code: def load_adjacencylist(
      file_, undirected=False, chunksize=10000, unchecked=True
  ):
      if unchecked:
          parse_func = parse_adjacencylist_unchecked
          convert_func = from_adjlist_unchecked
      else:
          parse_func = parse_adjacencylist
          convert_func = from_adjlist
  
      adjlist = []
  
      t0 = time()
  
      total = 0
      with open(file_) as f:
          for idx, adj_chunk in enumerate(
              map(parse_func, grouper(int(chunksize), f))
          ):
              adjlist.extend(adj_chunk)
              total += len(adj_chunk)
  
      t1 = time()
  
      logger.info(
          "Parsed {} edges with {} chunks in {}s".format(
              total, idx, t1 - t0
          )
      )
  
      t0 = time()
      G = convert_func(adjlist)
      t1 = time()
  
      logger.info("Converted edges to graph in {}s".format(t1 - t0))
  
      if undirected:
          t0 = time()
          G = G.make_undirected()
          t1 = time()
          logger.info("Made graph undirected in {}s".format(t1 - t0))
  
      return G
  
imports: import logging
  import sys
  from io import open
  from os import path
  from time import time
  from glob import glob
  from six.moves import range, zip, zip_longest
  from six import iterkeys
  from collections import defaultdict, Iterable
  import random
  from random import shuffle
  from itertools import product, permutations
  from scipy.io import loadmat
  from scipy.sparse import issparse
label_desc: Use image node_id 7 for calling a global function with example usage: load_adjacencylist(file_, undirected, chunksize, unchecked) and returns: G