def set_estimator(self, estimator):
    'A setter called automatically by the target estimator.\n\n    If the estimator is locked, this method does nothing.\n\n    Args:\n      estimator: the estimator that this monitor monitors.\n\n    Raises:\n      ValueError: if the estimator is None.\n    '
    if self._estimator_locked:
        return
    if (estimator is None):
        raise ValueError('Missing estimator.')
    self._estimator = estimator
A setter called automatically by the target estimator.

If the estimator is locked, this method does nothing.

Args:
  estimator: the estimator that this monitor monitors.

Raises:
  ValueError: if the estimator is None.
def set_estimator(self, estimator):
    'A setter called automatically by the target estimator.\n\n    If the estimator is locked, this method does nothing.\n\n    Args:\n      estimator: the estimator that this monitor monitors.\n\n    Raises:\n      ValueError: if the estimator is None.\n    '
    if self._estimator_locked:
        return
    if (estimator is None):
        raise ValueError('Missing estimator.')
    self._estimator = estimator