I'm trying to find the rank of list items in an efficient way. The problem is when I have a None value.

My current solution put the None either at the top or bottom of the rank depending on the `reverse` value:

```py
tmp = [29.84087, 34.3745, 34.91104, 35.72471, 19.31632, 728.1475, None, 404.3762, None]

[sorted(values, key=lambda x: (x is None, x), reverse=False).index(x) + 1 for x in values]

-> [2, 3, 4, 5, 1, 7, 8, 6]

```

How should I change the ranking code to get None for None values?

Desired output looks like this:

```
[2, 3, 4, 5, 1, 7, None, 6, None]

```