Write a function, nesting_score, that takes in a string of brackets as an argument. The function should return the score of the string according to the following rules:
- [] is worth 1 point
- XY is worth m + n points where X, Y are substrings of well-formed brackets and m, n are their respective scores
- [S] is worth 2 * k points where S is a substring of well-formed brackets and k is the score of that substring
You may assume that the input only contains well-formed square brackets.
nesting_score("[]") # -> 1nesting_score("[][][]") # -> 3nesting_score("[[]]") # -> 2nesting_score("[[][]]") # -> 4nesting_score("[[][][]]") # -> 6nesting_score("[[][]][]") # -> 5nesting_score("[][[][]][[]]") # -> 7nesting_score("[[[[[[[][]]]]]]][]") # -> 129nesting_score("") # -> 0