<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _enforce_bounds(self, x):
 """"Enforce the bounds on x if only infinitesimal violations occurs"""

        assert len(x) == len(self.bounds)
        x_enforced = []
        for x_i, (lb, ub) in zip(x, self.bounds):
            if x_i < lb:
                if x_i > lb - (ub-lb)/1e10:
                    x_enforced.append(lb)
                else:
                    x_enforced.append(x_i)
            elif x_i > ub:
                if x_i < ub + (ub-lb)/1e10:
                    x_enforced.append(ub)
                else:
                    x_enforced.append(x_i)
            else:
                x_enforced.append(x_i)
        return np.array(x_enforced)