<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def truncate(value: Decimal, n_digits: int) -> Decimal: """Truncates a value to a number of decimals places"""

    return Decimal(math.trunc(value * (10 ** n_digits))) / (10 ** n_digits)