<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def accept(self, discovery: ControllerDiscovery):
 """ Returns True if the supplied ControllerDiscovery matches this requirement, False otherwise """

        if self.require_class is not None and not isinstance(discovery.controller, self.require_class):
            return False
        if self.snames is not None:
            all_controls = discovery.controller.buttons.names + discovery.controller.axes.names
            for sname in self.snames:
                if sname not in all_controls:
                    return False
        return True