<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def unbind_filter(self, direction):
 """ Removes packet filter for this NIO. :param direction: "in", "out" or "both" """


        if direction not in self._dynamips_direction:
            raise DynamipsError("Unknown direction {} to unbind filter:".format(direction))
        dynamips_direction = self._dynamips_direction[direction]

        yield from self._hypervisor.send("nio unbind_filter {name} {direction}".format(name=self._name,
                                                                                       direction=dynamips_direction))

        if direction == "in":
            self._input_filter = None
        elif direction == "out":
            self._output_filter = None
        elif direction == "both":
            self._input_filter = None
            self._output_filter = None