@staticmethod
    def add_dict(columns, keys, key_set, key, value):
        if not isinstance(value, dict):
            raise InternalModuleError(
                    "Entry for key %r is not an object" % key)
        value_keys = set(value.keys())
        m = key_set - value_keys
        if m:
            raise InternalModuleError(
                    "Entry for key %r is missing field %r" % (
                    key,
                    next(iter(m))))
        m = value_keys - key_set
        if m:
            raise InternalModuleError(
                    "Entry for key %r has unexpected field %r" % (
                    key,
                    next(iter(m))))
        if key is None:
            for i, k in enumerate(keys):
                columns[i].append(value[k])
        else:
            columns[0].append(key)
            for i, k in enumerate(keys):
                columns[i + 1].append(value[k])
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/packages/tabledata/read/convert.py/BaseConverter.add_dict/original