code: def _round(ctx, number, num_digits):
      
      number = conversions.to_decimal(number, ctx)
      num_digits = conversions.to_integer(num_digits, ctx)
  
      return decimal_round(number, num_digits, ROUND_HALF_UP)
docs: Rounds a number to a specified number of digits