def initialResult(text, options, mode):
    """Returns a dictionary of the initial state."""
    result = {
        'mode': mode,
        'origText': text,
        'origLines': text.split(NEWLINE),
        'lines': [],
        'lineNo': -1,
        'ch': '',
        'x': 0,
        'parenStack': [],
        'parenTrail': {
            'lineNo': None,
            'startX': None,
            'endX': None,
            'openers': [],
        },
        'cursorX': None,
        'cursorLine': None,
        'cursorDx': None,
        'isInCode': True,
        'isEscaping': False,
        'isInStr': False,
        'isInComment': False,
        'commentX': None,
        'quoteDanger': False,
        'trackingIndent': False,
        'skipChar': False,
        'success': False,
        'maxIndent': None,
        'indentDelta': 0,
        'error': {
            'name': None,
            'message': None,
            'lineNo': None,
            'x': None,
        },
        'errorPosCache': {},
    }

    if isinstance(options, dict):
        if 'cursorDx' in options:
            result['cursorDx'] = options['cursorDx']
        if 'cursorLine' in options:
            result['cursorLine'] = options['cursorLine']
        if options in 'cursorX':
            result['cursorX'] = options['cursorX']

    return result

#-------------------------------------------------------------------------------
# Possible Errors
#-------------------------------------------------------------------------------
dataset/ETHPy150Open oakmac/sublime-text-parinfer/parinfer.py/initialResult/swapped operands of `in`