def convert_missing_indexer(indexer):

    if isinstance(indexer, dict):

        # a missing key (but not a tuple indexer)
        indexer = indexer['key']

        if isinstance(indexer, bool):
            raise KeyError("cannot use a single bool to index into setitem")
        return indexer, True

    return indexer, False
reverse convert a missing indexer, which is a dict
dataset/ETHPy150Open pydata/pandas/pandas/core/indexing.py/convert_missing_indexer