<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def restrict_to_parent(self, target, parent):
 """Restrict target to parent structure boundaries."""

        if not (parent['start'] < target < parent['end']):
            target = parent['end']
        return target