def METHOD_NAME(oil):
    '''
    Fresh oil: Second density separated by temperature.
    Score = deltaT/40 but not greater than 0.5
    maxDeltaT: The difference between the lowest and highest
    measurement in the set.
    '''
    if len(oil.sub_samples) > 0:
        ss = oil.sub_samples[0]
        densities = ss.physical_properties.densities
        temps = [d.ref_temp.converted_to('C').value
                 for d in densities
                 if d.ref_temp is not None]
        if len(temps) >= 2:
            t1, *_, t2 = sorted([t for t in temps if t is not None])
            delta_t = t2 - t1
            if delta_t > 0.0:
                return min(delta_t / 40.0, 0.5)
    return 0.0