(func)
| 217 | |
| 218 | # Create a new function so we can attach properties to it. |
| 219 | def MakeBoundFunction(func): |
| 220 | # We need the lambda to capture "func" from the enclosing scope. |
| 221 | # pylint: disable-next=unnecessary-lambda |
| 222 | return lambda *args, **kwargs: func.call(*args, **kwargs) |
| 223 | bound_function = MakeBoundFunction(api_func) |
| 224 | |
| 225 | # Add docs. |