def _get_statements_from_json(blob): """ Deserialize all statements from the JSON blob. """ statements = [] for statement_data in blob["statements"]: statement = GraphStatement.create_from_json(statement_data) statements.append(statement) return statements
def _get_statements_from_json(blob: Dict, short_job_name: Optional[str] = None) -> List[GraphStatement]: """ Deserialize all statements from the JSON blob. """ statements: List[GraphStatement] = [] for i, statement_data in enumerate(blob["statements"]): # i+1 to make it 1-based and not 0-based to help with log readability statement: GraphStatement = GraphStatement.create_from_json(statement_data, short_job_name, i + 1) statements.append(statement) return statements