<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _use_prototype(self, spec, prototypes):
 """ Populates the given spec with the values of it's declared prototype Args: spec (dict):
 spec to update prototypes (dict):
 Configuration spec containing the prototypes Returns: dict: updated spec """

        prototype = spec['based-on']
        del spec['based-on']
        for attr in prototype:
            if attr not in spec:
                spec[attr] = copy.deepcopy(prototype[attr])

        return spec