code: def calc_wtd_exp(skydir, ltc, event_class, event_types,
                   egy_bins, cth_bins, fn, nbin=16):
      
      cnts = calc_counts_edisp(skydir, ltc, event_class, event_types,
                               egy_bins, cth_bins, fn, nbin=nbin)
      flux = fn.flux(egy_bins[:-1], egy_bins[1:])
      return cnts / flux[:, None]
docs: Calculate the effective exposure.
  
      Parameters
      ----------
      skydir : `~astropy.coordinates.SkyCoord`
  
      ltc : `~fermipy.irfs.LTCube`
  
      nbin : int    
          Number of points per decade with which to sample true energy.