Write a function that checks if the input is or is not a number.
Treat the input as a string and return True only for valid finite decimal or scientific-notation formats. Allow an optional leading sign, decimal values such as 12, -3.5, .8, and 7., and exponents such as 1e-4; reject whitespace, empty strings, malformed numbers, NaN, and infinity.
Input: one string value.
Output: a Boolean indicating whether value is a valid number.
def is_number(value):