code: def _combine_msd_quan(msd, quan):
      
      dim1 = msd.shape
      n_par, _, n_chains = dim1
      ll = []
      for i in range(n_chains):
          a1 = msd[:, :, i]
          a2 = quan[:, :, i]
          ll.append(np.column_stack([a1, a2]))
      msdquan = np.dstack(ll)
      return msdquan
docs: Combine msd and quantiles in chain summary
  
      Parameters
      ----------
      msd : array of shape (num_params, 2, num_chains)
         mean and sd for chains
      cquan : array of shape (num_params, num_quan, num_chains)
          quantiles for chains
  
      Returns
      -------
      msdquan : array of shape (num_params, 2 + num_quan, num_chains)