<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def copy(self: DevicesTypeBound) -> DevicesTypeBound: """Return a shallow copy of the actual |Nodes| or |Elements| object. Method |Devices.copy| returns a semi-flat copy of |Nodes| or |Elements| objects, due to their devices being not copyable: True False False True Changing the |Device.name| of a device is recognised both by the original and the copied collection objects: Node("z", variable="Q") Node("z", variable="Q") Deep copying is permitted due to the above reason: Traceback (most recent call last):
 NotImplementedError: Deep copying of Nodes objects is not supported, \ as it would require to make deep copies of the Node objects themselves, \ which is in conflict with using their names as identifiers. """

        new = type(self)()
        vars(new).update(vars(self))
        vars(new)['_name2device'] = copy.copy(self._name2device)
        vars(new)['_shadowed_keywords'].clear()
        for device in self:
            _id2devices[device][id(new)] = new
        return new