code: def creating_graphs(tmpdir):
      graphlist = []
      graphnames = ["name" + str(i) for i in range(6)]
      for idx, name in enumerate(graphnames):
          graph = np.random.rand(10, 10)
          G = nx.from_numpy_array(graph)
          out_file = tmpdir.strpath + graphnames[idx] + ".pck"
          # Save as pck file
          with open(out_file, "wb") as f:
              pickle.dump(G, f, pickle.HIGHEST_PROTOCOL)
          graphlist.append(out_file)
      return graphlist
  
file_path: nipype/nipype/interfaces/cmtk/tests/test_nbs.py
imports: from ..nbs import NetworkBasedStatistic
  from ....utils.misc import package_check
  import numpy
  import networkx
  import pickle
  import pytest
label_desc: Use image node_id 1 for calling a global function with example usage: creating_graphs(tmpdir) and returns: graphlist