def from_json(self, dictionary):
    """Loads the NLToSQLInput attributes from a dictionary."""
    self.original_utterance = dictionary['original_utterance']
    self.tables = [
        DatabaseTable().from_json(table) for table in dictionary['tables']
    ]
    self.utterance_wordpieces = [
        Wordpiece().from_json(wordpiece)
        for wordpiece in dictionary['utterance_wordpieces']
    ]

    return self
Loads the NLToSQLInput attributes from a dictionary.
language/xsp/data_preprocessing/nl_to_sql_example.py