This should be changed to `if labels is not None:` makes it more readable and it's a little faster :D