def METHOD_NAME(self, previous_step_manager, scheduled_task,
                         database, task):
    if self.step_manger_class is None:
        raise Exception(('You must set your step_manager class in variable'
                        'step_manager_class'))
    step_manager = self.step_manger_class()
    if previous_step_manager is None:
        previous_step_manager = self.step_manger_class.objects.filter(
            can_do_retry=True,
            database=database,
            status=self.step_manger_class.ERROR
        ).last()
    if previous_step_manager:
        step_manager = copy(previous_step_manager)
        step_manager.id = None
        step_manager.started_at = None
        step_manager.current_step = previous_step_manager.current_step
        step_manager.task_schedule = (
            previous_step_manager.task_schedule
        )
    step_manager.database = database
    step_manager.task = task
    if scheduled_task:
        step_manager.task_schedule = scheduled_task
    step_manager.set_running()
    step_manager.save()
    return step_manager