human
Here's a good function header given the following:
I wrote the below code

    def helper(x, y):
        scipy_ver = [int(n) for n in scipy.__version__.split('.')[:2]]
        assert (scipy_ver >= [0, 13])
        if hasattr(x, 'getnnz'):
            x = as_sparse_variable(x)
        if hasattr(y, 'getnnz'):
            y = as_sparse_variable(y)
        if (not isinstance(x, theano.Variable)):
            x = theano.tensor.as_tensor_variable(x)
        if (not isinstance(y, theano.Variable)):
            y = theano.tensor.as_tensor_variable(y)
        x_is_sparse_variable = _is_sparse_variable(x)
        y_is_sparse_variable = _is_sparse_variable(y)
        assert (x_is_sparse_variable or y_is_sparse_variable)
        if (x_is_sparse_variable and y_is_sparse_variable):
            return SS(x, y)
        elif (x_is_sparse_variable and (not y_is_sparse_variable)):
            return SD(x, y)
        elif (y_is_sparse_variable and (not x_is_sparse_variable)):
            return DS(y, x)
        else:
            raise NotImplementedError()
    return helper

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

def __ComparisonSwitch(SS, SD, DS):