keras/src/backend/torch/core.py/Variable/trainable
class Variable:    def trainable(self, value):
        self._trainable = value
        if self._value is not None:
            self._value.requires_grad = value