<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def bind_to_instance(self, instance):
 """ Bind a ResourceApi instance to an operation. """

        self.binding = instance
        self.middleware.append(instance)