def _get_portable_table_foreign_keys_list(self, table_foreign_keys):
        foreign_keys = OrderedDict()

        for value in table_foreign_keys:
            value = dict((k.lower(), v) for k, v in value.items())
            name = value.get('constraint_name', '')

            if foreign_keys not in name:
                if 'on_delete' not in value or value['on_delete'] == 'RESTRICT':
                    value['on_delete'] = None

                if 'on_update' not in value or value['on_update'] == 'RESTRICT':
                    value['on_update'] = None

                foreign_keys[name] = {
                    'name': name,
                    'local': [],
                    'foreign': [],
                    'foreign_table': value['table'],
                    'on_delete': value['on_delete'],
                    'on_update': value['on_update'],
                    'deferrable': value.get('deferrable', False),
                    'deferred': value.get('deferred', False)
                }

            foreign_keys[name]['local'].append(value['from'])
            foreign_keys[name]['foreign'].append(value['to'])

        result = []
        for constraint in foreign_keys.values():
            result.append(
                ForeignKeyConstraint(
                    constraint['local'], constraint['foreign_table'],
                    constraint['foreign'], constraint['name'],
                    {
                        'on_delete': constraint['on_delete'],
                        'on_update': constraint['on_update'],
                        'deferrable': constraint['deferrable'],
                        'deferred': constraint['deferred']
                    }
                )
            )

        return result
dataset/ETHPy150Open sdispater/orator/orator/dbal/sqlite_schema_manager.py/SQLiteSchemaManager._get_portable_table_foreign_keys_list/swapped operands of `not in`