human
Complete this python program:
def _ovsdb_retry(fn):
assistant
#Here is the Python program you requested.

    """Decorator for retrying when OVS has yet to assign an ofport.
    The instance\s vsctl_timeout is used as the max waiting time. This relies
    on the fact that instance methods receive self as the first argument.
    """
    @six.wraps(fn)
    def wrapped(*args, **kwargs):
        self = args[0]
        new_fn = tenacity.retry(reraise=True, retry=tenacity.retry_if_result(_ovsdb_result_pending), wait=tenacity.wait_exponential(multiplier=0.01, max=1), stop=tenacity.stop_after_delay(self.vsctl_timeout))(fn)
        return new_fn(*args, **kwargs)
    return wrapped