<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def parents(self, child):
 """Return set of parents of child. Parameters child : :class:`katcp.Sensor` object Child whose parents to return. Returns ------- parents : set of :class:`katcp.Sensor` objects The parent sensors of child. """

        if child not in self._child_to_parents:
            raise ValueError("Child sensor %r not in tree." % child)
        return self._child_to_parents[child].copy()