Get the first available key of `self.keys` in the input `data` dictionary. If no available key, return an empty tuple `()`. Args: data: data that the transform will be applied to.
(self, data: dict[Hashable, Any])
| 489 | ) |
| 490 | |
| 491 | def first_key(self, data: dict[Hashable, Any]): |
| 492 | """ |
| 493 | Get the first available key of `self.keys` in the input `data` dictionary. |
| 494 | If no available key, return an empty tuple `()`. |
| 495 | |
| 496 | Args: |
| 497 | data: data that the transform will be applied to. |
| 498 | |
| 499 | """ |
| 500 | return first(self.key_iterator(data), ()) |