def METHOD_NAME(value: pendulum.DateTime, microsecond_precision: int) -> pendulum.DateTime:
    return value.set(microsecond=value.microsecond // 10**(6 - microsecond_precision) * 10**(6 - microsecond_precision))  # type: ignore