def METHOD_NAME(src, idx):
    name = "SRC%d" % idx
    try:
        flux = ModelClasses.Polarization(src["Total_flux"], src["Total_Q"],
                                         src["Total_U"], src["Total_V"],
                                         I_err=src["E_Total_flux"],
                                         Q_err=src["E_Total_Q"],
                                         U_err=src["E_Total_U"],
                                         V_err=src["E_Total_V"])
    except KeyError:
        flux = ModelClasses.Polarization(src["Total_flux"], 0, 0, 0,
                                         I_err=src["E_Total_flux"])
    ra, ra_err = map(numpy.deg2rad, (src["RA"], src["E_RA"]))
    dec, dec_err = map(numpy.deg2rad, (src["DEC"], src["E_DEC"]))
    pos = ModelClasses.Position(ra, dec, ra_err=ra_err, dec_err=dec_err)
    ex, ex_err = map(numpy.deg2rad, (src["DC_Maj"], src["E_DC_Maj"]))
    ey, ey_err = map(numpy.deg2rad, (src["DC_Min"], src["E_DC_Min"]))
    pa, pa_err = map(numpy.deg2rad, (src["PA"], src["E_PA"]))
    if ex and ey:
        shape = ModelClasses.Gaussian(
            ex, ey, pa, ex_err=ex_err, ey_err=ey_err, pa_err=pa_err)
    else:
        shape = None
    source = SkyModel.Source(name, pos, flux, shape=shape)
    # Adding source peak flux (error) as extra flux attributes for sources,
    # and to avoid null values for point sources I_peak = src["Total_flux"]
    if shape:
        source.setAttribute("I_peak", src["Peak_flux"])
        source.setAttribute("I_peak_err", src["E_peak_flux"])
    else:
        source.setAttribute("I_peak", src["Total_flux"])
        source.setAttribute("I_peak_err", src["E_Total_flux"])
    if spi_do:
        # Check if start frequency is provided if not provided raise error.
        # It is used to define tigger source spectrum index frequency
        if freq0:
            spi, spi_err = (src['Spec_Indx'], src['E_Spec_Indx'])
            source.spectrum = ModelClasses.SpectralIndex(spi, freq0)
            source.setAttribute('spi_error', spi_err)
        else:
            raise RuntimeError("No start frequency (freq0) provided.")
    return source