code: def addStepListener(listener):
      
      if issubclass(type(listener), StepListener):
          _stepListeners.append(listener)
          return True
      warnings.warn(
          "Proposed listener's type must inherit from traci.StepListener. Not adding object of type '%s'" % type(listener))
      return False
docs: addStepListener(traci.StepListener) -> bool
  
      Append the step listener (its step function is called at the end of every call to traci.simulationStep())
      Returns True if the listener was added successfully, False otherwise.