<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def newsnr_sgveto_psdvar(snr, bchisq, sgchisq, psd_var_val):
 """ Combined SNR derived from NewSNR, Sine-Gaussian Chisq and PSD variation statistic """

    nsnr = numpy.array(newsnr_sgveto(snr, bchisq, sgchisq), ndmin=1)
    psd_var_val = numpy.array(psd_var_val, ndmin=1)
    lgc = psd_var_val >= 1.8
    nsnr[lgc] = nsnr[lgc] / numpy.sqrt(psd_var_val[lgc])

    # If snr input is float, return a float. Otherwise return numpy array.
    if hasattr(snr, '__len__'):
        return nsnr
    else:
        return nsnr[0]