def cursor(lcd, row, col):
    """
    Context manager to control cursor position. DEPRECATED.
    """
    warnings.warn('The `cursor` context manager is deprecated', DeprecationWarning)
    lcd.cursor_pos = (row, col)
    yield
Context manager to control cursor position. DEPRECATED.