<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_from_tables(cls, norm_type='eflux', tab_s="SCANDATA", tab_e="EBOUNDS"):
 """Create a CastroData object from two tables Parameters norm_type : str Type of normalization to use. Valid options are: * norm : Normalization w.r.t. to test source * flux : Flux of the test source ( ph cm^-2 s^-1 ) * eflux: Energy Flux of the test source ( MeV cm^-2 s^-1 ) * npred: Number of predicted photons (Not implemented) * dnde : Differential flux of the test source ( ph cm^-2 s^-1 MeV^-1 ) tab_s : str table scan data tab_e : str table energy binning and normalization data Returns ------- castro : `~fermipy.castro.CastroData` """

        if norm_type in ['flux', 'eflux', 'dnde']:
            norm_vals = np.array(tab_s['norm_scan'] *
                                 tab_e['ref_%s' % norm_type][:, np.newaxis])
        elif norm_type == "norm":
            norm_vals = np.array(tab_s['norm_scan'])
        else:
            raise Exception('Unrecognized normalization type: %s' % norm_type)

        nll_vals = -np.array(tab_s['dloglike_scan'])

        rs = ReferenceSpec.create_from_table(tab_e)
        return cls(norm_vals, nll_vals, rs, norm_type)