For key-value pairs in the self.data, if the value is a callable, then this function will apply the callable to the input data. The result will be written under the same key under the output dict. Args: data: input data. Returns: a d
(self, data: Any, **kwargs: Any)
| 26 | """ |
| 27 | |
| 28 | def evaluate(self, data: Any, **kwargs: Any) -> dict: |
| 29 | """ |
| 30 | For key-value pairs in the self.data, if the value is a callable, |
| 31 | then this function will apply the callable to the input data. |
| 32 | The result will be written under the same key under the output dict. |
| 33 | |
| 34 | Args: |
| 35 | data: input data. |
| 36 | |
| 37 | Returns: |
| 38 | a dictionary which has same keys as the self.data if the value |
| 39 | is callable. |
| 40 | """ |
| 41 | return {k: v(data, **kwargs) for k, v in self.data.items() if callable(v)} |
| 42 | |
| 43 | |
| 44 | class SampleOperations(Operations): |