Inputs:
List: (any): The list to group.
Key: (string): The key to group by.
Ranges: (any[ ... ]): The ranges to group by.
Outputs:
Groups: (object[ ... ]): The groups.
Group items in a list by ranges of a key. lower bound is inclusive, upper bound is exclusive.