Pergunta de entrevista da empresa Tesla

Log Processor Outline: You are developing a log processing system, which is made up of many different "steps" that process the logs in different ways. Each step is declared in advance, and the system is built up by feeding the output of one step into the inputs of other steps. Each step has a python function (stored in the "action" attribute) that gets evaluated to produce the output for that step. The user interacts with the system by telling the system they want the output of a particular step, and the system will call the action for that step (and any other actions that the desired step depends on) to return the processed log. Each step is given an "output_name" attribute, which the user can use to get the output of that step. The "input_names" attribute stores a list of strings that match the output_name from other steps, so that the output value from one step can be used as an input parameter to other steps. Read further to see examples of the system in action, and begin with Questions 1-4.