def METHOD_NAME(
    self, path: Tuple[str, ...], bindable_keys: FrozenSet['cirq.MeasurementKey']
) -> 'cirq.Condition':
    condition = self
    for key in self.keys:
        for i in range(len(path) + 1):
            back_path = path[: len(path) - i]
            new_key = key.with_key_path_prefix(*back_path)
            if new_key in bindable_keys:
                condition = condition.replace_key(key, new_key)
                break
    return condition