human
I wrote the below code

    def _versionTuple(v):
        return tuple(map(int, v.split('.')))
    if (rampType is None):
        driver = pyglet.gl.gl_info.get_renderer()
        osxVer = platform.mac_ver()[0]
        if osxVer:
            osxVerTuple = _versionTuple(osxVer)
            if ('NVIDIA' in driver):
                if (_versionTuple('10.5') < osxVerTuple < _versionTuple('10.6')):
                    rampType = 2
                elif (_versionTuple('10.6') < osxVerTuple):
                    rampType = 3
                else:
                    rampType = 1
            else:
                rampType = 1
        else:
            rampType = 0
    if (rampType == 0):
        ramp = numpy.linspace(0.0, 1.0, num=256)
    elif (rampType == 1):
        ramp = numpy.linspace(old_div(1, 256.0), 1.0, num=256)
    elif (rampType == 2):
        ramp = numpy.linspace(0, old_div(1023.0, 1024), num=1024)
    elif (rampType == 3):
        ramp = numpy.linspace(0, old_div(1023.0, 1024), num=1024)
        ramp[512:] = (ramp[512:] - old_div(1, 256.0))
    logging.info(('Using    gamma    ramp    type:    %i' % rampType))
    return ramp

What's a good function header?
assistant
#Here's a good function header.

def createLinearRamp(win, rampType=None):