<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def decimal_to_digits(decimal, min_digits=None):
 """ Return the number of digits to the first nonzero decimal. Parameters decimal: float min_digits: int, minimum number of digits to return Returns digits: int, number of digits to the first nonzero decimal """

    digits = abs(int(np.log10(decimal)))
    if min_digits is not None:
        digits = np.clip(digits, min_digits, 20)
    return digits