code: def gather_data(mypath, key="width"):
      
      filenames = [join(mypath, f) for f in listdir(mypath) if isfile(join(mypath, f))]
      filenames = [f for f in filenames if f.endswith(".p")] 
      W = []
      for filename in filenames:
          with open(filename, 'r') as f:
              data = pickle.load(f)
              W.append(np.expand_dims(data[key], axis=-1) )
  
      W = np.concatenate(W, axis=-1)
      return W
docs: Loads trials from a folder and 
          returns an array indexed by: m, k, t.