Create a function named rate_animal that will rate the value of animals on a numeric scale (1-4, where 1 is best and 4 is worst). Your function should consume a variable (holding a string value) named an_animal and return an integer from 1-4 for each of four possible inputs: "dog", "cat", "capybara", and "danger noodle". Each animal should have its own value: "capybara" is 1, "dog" is 2, "cat" is 3 and "danger noodle" is 4. If the string given is not a valid animal from the list, return -1.

Unit test the result, but also use your function to print out your favorite animal’s rating. This should be the animal that produces the value 1.