(self)
| 647 | return capture[1] |
| 648 | |
| 649 | def clear_captures(self): |
| 650 | # TODO(b/115366440): Delete this method when a custom OrderedDict is added. |
| 651 | # Clearing captures using clear() leaves some cycles around. |
| 652 | while self._captures: |
| 653 | self._captures.popitem() |
| 654 | memory.dismantle_ordered_dict(self._captures) |
| 655 | while self._deferred_captures: |
| 656 | self._deferred_captures.popitem() |
| 657 | memory.dismantle_ordered_dict(self._deferred_captures) |
| 658 | |
| 659 | def capture_distributed_variable(self, variable, placeholder): |
| 660 | """Add given distributed variable to captures with given placeholder.""" |
no test coverage detected