code: def merge_all_gti_data(datalist_in, nrows, first):
      
      max_row = nrows.cumsum()
      min_row = max_row - nrows
      out_hdu = fits.BinTableHDU.from_columns(
          first.columns, header=first.header, nrows=nrows.sum())
  
      for (imin, imax, data_in) in zip(min_row, max_row, datalist_in):
          for col in first.columns:
              out_hdu.data[col.name][imin:imax] = data_in[col.name]
  
      return out_hdu
docs: Merge together all the GTI data
  
      Parameters
      -------
      datalist_in : list of `astropy.io.fits.BinTableHDU` data
          The GTI data that is being merged
  
      nrows : `~numpy.ndarray` of ints
          Array with the number of nrows for each object in datalist_in
  
      first : `astropy.io.fits.BinTableHDU`
          BinTableHDU to use as a template
  
      Returns
      -------
      out_hdu : `astropy.io.fits.BinTableHDU`
          BinTableHDU with the merge GTIs