def __enter__(self):
    if self._managed:
        raise errors.InterfaceError('cannot enter context: already in a `with` block')
    self._managed = True
    self.start()
    return self
def __enter__(self):
    if self._managed:
        raise errors.InterfaceError('cannot enter context: already in a `with` block')
    self._managed = True
    self.start()
    return self