<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def when_matches_async(self, path, good_value, bad_values=None):
 """Wait for an attribute to become a given value Args: path (list):
 The path to wait to good_value: If it is a callable then expect it to return True if we are satisfied and raise on error. If it is not callable then compare each value against this one and return if it matches. bad_values (list):
 values to raise an error on Returns: Future: a single Future that will resolve when the path matches good_value or bad_values """

        when = When(good_value, bad_values)
        future = self.subscribe(path, when)
        when.set_future_context(future, weakref.proxy(self))
        return future