code: def __execute_steps_by_action(self, context, action):
          
          if len(self.actions[action]) > 0:
              if action in [ACTIONS_BEFORE_FEATURE, ACTIONS_BEFORE_SCENARIO, ACTIONS_AFTER_FEATURE]:
                  self.logger.by_console('\n')
                  if action == ACTIONS_BEFORE_SCENARIO:
                      self.scenario_counter += 1
                      self.logger.by_console(
                          "  ------------------ Scenario Nº: %d ------------------" % self.scenario_counter)
                  self.logger.by_console('  %s:' % action)
              for item in self.actions[action]:
                  self.scenario_error = False
                  try:
                      self.__print_step_by_console(item)
                      context.execute_steps(u'''%s%s''' % (GIVEN_PREFIX, self.__remove_prefix(item)))
                      self.logger.debug(u'step defined in pre-actions: %s' % repr(item))
                  except Exception as exc:
                      if action in [ACTIONS_BEFORE_FEATURE]:
                          self.feature_error = True
                      elif action in [ACTIONS_BEFORE_SCENARIO]:
                          self.scenario_error = True
                      self.logger.error(exc)
                      break
docs: execute a steps set by action
          :param context: It’s a clever place where you and behave can store information to share around, automatically managed by behave.
          :param action: action executed: see labels allowed above.